From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E285C3858C60; Thu, 9 Mar 2023 23:12:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E285C3858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678403573; bh=88l4HOmjW4D+ZyaVEKw7oq0kyTyu/PEneKYkU1lQt9I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Fs6IJbpAu6jZl272Ry4fgHwrbH7rcxZQzN/7GVjwd28YhNsBIsisv4oZBGVc9PpPo ypxeE/I/8dnW+RNVKU7BDlAxNtU2kYd2U/J/uVPQO+8W/AKsuLApN5CTxWhqV94t6C KCr3szQOpKliVJz2o0IJTn+CGX7K81SF1d50rkQU= From: "ppalka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109084] [10/11/12/13 Regression] requires keyword can't access private static constexpr bool in templated class Date: Thu, 09 Mar 2023 23:12:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: ppalka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109084 --- Comment #3 from Patrick Palka --- template class MyClass { private: static constexpr bool cond =3D true; public: MyClass(T) requires cond; }; MyClass c{0}; The problem seems to be that the access context during satisfaction of #1's implicit guide [with T=3Dint] is MyClass instead of MyClass, and MyClass::cond (the substituted result of maybe_dependent_member_ref) is considered inaccessible from MyClass.=