https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101013
Bug ID: 101013 Summary: Rejects-valid for alias template in a different namespace with a lambda in unevaluated context Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tartanllama at gmail dot com Target Milestone: --- Code: namespace ns { template <class T> using void_t = decltype([]{}()); } template<class T> struct oh_no { using type = ns::void_t<T>; }; Compiler output: <source>:8:22: error: '<expression error>' in namespace 'ns' does not name a type 8 | using type = ns::void_t<T>; | ^~~~~~~~~ Expected behaviour: Compile cleanly Additional information: The code compiles if oh_no and void_t are in the same namespace GCC version and configuration options: GCC 11.1.0 ../gcc-11.1.0/configure --prefix=/opt/compiler-explorer/gcc-build/staging --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --disable-bootstrap --enable-multiarch --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --enable-clocale=gnu --enable-languages=c,c++,fortran,ada,go,d --enable-ld=yes --enable-gold=yes --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-linker-build-id --enable-lto --enable-plugins --enable-threads=posix --with-pkgversion=Compiler-Explorer-Build Command line: -std=c++20 Compiler explorer link: https://godbolt.org/z/EYsbbjodj