From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9FC313896C23; Thu, 10 Jun 2021 10:43:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9FC313896C23 From: "tartanllama at gmail dot com" 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tartanllama at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 10:43:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101013 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 using void_t =3D decltype([]{}()); } template struct oh_no { using type =3D ns::void_t; }; Compiler output: :8:22: error: '' in namespace 'ns' does not name a type 8 | using type =3D ns::void_t; | ^~~~~~~~~ Expected behaviour:=20 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=3D/opt/compiler-explorer/gcc-build/staging --build=3Dx86_64-linux-gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linu= x-gnu --disable-bootstrap --enable-multiarch --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --enable-clocale=3Dgnu --enable-languages=3Dc,c++,fortran,ada,go,d --enable-ld=3Dyes --enable-gold= =3Dyes --enable-libstdcxx-debug --enable-libstdcxx-time=3Dyes --enable-linker-buil= d-id --enable-lto --enable-plugins --enable-threads=3Dposix --with-pkgversion=3DCompiler-Explorer-Build Command line:=20 -std=3Dc++20 Compiler explorer link: https://godbolt.org/z/EYsbbjodj=