- Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party
Description
Following valid C++ code won't compile:
template<class> struct S { template<class> inline static auto mem = 42; }; using T = decltype(S<void>::mem<void>); T y = 42; int main() {}Compiling with:
clang++-22 -std=c++17 source.cpp Errors are as follows:
source.cpp:9:3: error: cannot initialize a variable of type 'T' (aka 'auto') with an rvalue of type 'int' 9 | T y = 42; | ^ ~~ 1 error generated. This may be related to #56652, since it appears that the Clang frontend does not resolve the auto type, leaving code generation to handle an undeduced type.
saki7
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party