- Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issuelambdaC++11 lambda expressionsC++11 lambda expressions
Description
This fails to compile on clang-trunk.
template<int I> using X = decltype( []{ if constexpr(I == 0) return int{}; else return char{}; }() ); template<int I> inline constexpr auto Y = X<I>{}; static_assert(Y<1> == char{});Need to inject a template-param () for it to work.
Works on gcc. Godbolt: https://godbolt.org/z/3Ydv8b866.
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"diverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issuelambdaC++11 lambda expressionsC++11 lambda expressions