public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "tartanllama at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101013] New: Rejects-valid for alias template in a different namespace with a lambda in unevaluated context Date: Thu, 10 Jun 2021 10:43:03 +0000 [thread overview] Message-ID: <bug-101013-4@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2021-06-10 10:43 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-10 10:43 tartanllama at gmail dot com [this message] 2021-06-10 13:45 ` [Bug c++/101013] " mpolacek at gcc dot gnu.org 2024-04-13 7:51 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-101013-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).