From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 77AF93858D38; Thu, 10 Nov 2022 23:15:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77AF93858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668122130; bh=Sbgkeoe9Lk0ZRvXiABewzx7W0e9j/bOis/e0FfF3cwI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wKx81q8bqzrvCHzS000tDkSdinh0uEurHXgIeBSRw4qIXZBx11PEgTx0Trh8JuCXT aQIrCa9Wt0K1UMedN3lik3BGTy89Qx3dhz24CBNFGCdO9S/pfEmnik+SSe71Ir2YdX J7t6wHSrq/NSwx6hNLPDEeEORhGZ8A0ZLtOlMF00= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107605] constraint on a member function does causes ambigious and not allowing forming a pointer to the function Date: Thu, 10 Nov 2022 23:15:30 +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: 13.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: blocked short_desc 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=3D107605 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|101603 | Summary|GCC rejects valid program |constraint on a member |involving requires-clause |function does causes | |ambigious and not allowing | |forming a pointer to the | |function --- Comment #4 from Andrew Pinski --- At first I thought it was a pointer to member function issue but nope it is= not as the following happens too but we need to have have the class as a templa= te rather than the function: extern "C" int puts(const char*); template class myclass { public: static void func(const T&) requires true { puts("true"); } static void func(const T&) requires false { puts("false"); } };=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 auto mylambda =3D &myclass::func; Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101603 [Bug 101603] [meta-bug] pointer to member functions issues=