-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
[Clang][C++23] <
not parsed as the start of a template list in type-only contexts
#102502
Comments
@llvm/issue-subscribers-clang-frontend Author: Mital Ashok (MitalAshok)
https://eel.is/c++draft/temp.names#3
> A This wording was added by P1787R6 for C++23 https://godbolt.org/z/GanbhKTh1 template<typename T>
struct X : T::type<void> {};
template<typename T, typename = typename T::type<void>>
int Y = sizeof(typename T::type<void>);
// CWG2806
template<typename T>
concept C = requires {
typename T::type<void>;
};
// CWG2903
template<typename T>
struct Z : T::type<void>::type {}; Last two are valid after https://cplusplus.github.io/CWG/issues/2806.html and https://cplusplus.github.io/CWG/issues/2903.html
This compiles with MSVC only compiles this with template<typename T, typename = typename T::type<void>>
int Y = sizeof(typename T::type<void>); GCC compiles it all. |
These parts of changes seem to be the resolution of CWG1478 but touch more things than the original issue. Edit: Is this already tracked in #54150? |
@frederick-vs-ja I don't think this is related to CWG1478 because that's specifically about when there isn't a Reading P1787P6§Parsing makes it seem like type-only contexts (previously: type-id-only contexts, in Clang as |
This might be a dup of #95447 |
Also see: #81731 |
https://eel.is/c++draft/temp.names#3
This wording was added by P1787R6 for C++23
https://godbolt.org/z/GanbhKTh1
Last two are valid after https://cplusplus.github.io/CWG/issues/2806.html and https://cplusplus.github.io/CWG/issues/2903.html
This compiles with
-fms-extensions
.MSVC only compiles this with
/permissive
(not/permissive-
):GCC compiles it all.
The text was updated successfully, but these errors were encountered: