You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found by looking at g++.dg/cpp2a/typename16.C from the GCC test suite.
Clang produces an error here:
structX { X(int); };
template<typename T> structS {
friendX::X(T::type);
// <source>:3:13: error: qualified reference to 'X' is a constructor name rather than a type in this context
};
GCC and MSVC accept the code with no errors. See godbolt.
I believe Clang should accept this code without typename according to (temp.res)p4.3:
4. A qualified or unqualified name is said to be in a type-only context if it is the terminal name of
...
4.3 a decl-specifier of the decl-specifier-seq of a
...
4.3.3 parameter-declaration in a member-declaration,125 unless that parameter-declaration appears in a default argument,
The text was updated successfully, but these errors were encountered:
Found by looking at
g++.dg/cpp2a/typename16.C
from the GCC test suite.Clang produces an error here:
GCC and MSVC accept the code with no errors. See godbolt.
I believe Clang should accept this code without
typename
according to (temp.res)p4.3:The text was updated successfully, but these errors were encountered: