Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disambiguating class constructor definition followed by semicolon #346

Conversation

i-garrison
Copy link
Contributor

In this case member variable declaration would be longer (including trailing semicolon) but it is not valid since a class C shall not contain a non-static member of class C:

template<typename T>
struct S {
	S(T) {}; // was recognized as declaration of variable T of type S before this change
};

S<int> s(1); // declared constructor was not found

In this case member variable declaration would be longer (including
trailing semicolon) but it is not valid since a class C shall not contain
a non-static member of class C.
@i-garrison i-garrison marked this pull request as draft March 29, 2023 07:21
@i-garrison i-garrison marked this pull request as ready for review March 29, 2023 10:49
@jonahgraham jonahgraham merged commit 6cf3e03 into eclipse-cdt:main Apr 4, 2023
@jonahgraham jonahgraham added the language C/C++ Language Support label Apr 4, 2023
@jonahgraham jonahgraham added this to the 11.2.0 milestone Apr 4, 2023
@i-garrison i-garrison deleted the pr/fix-disambiguate-class-constructor-definition-with-semicolon branch April 4, 2023 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language C/C++ Language Support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants