From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1A9B63858D37; Thu, 22 Feb 2024 17:11:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A9B63858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708621914; bh=Hudl2R2GMOJvp1AWeLtt8wSVMurQKrNy4ILSpgUbSUk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pZGhoQOoCAQlJgyVmMYCNIAt3S/kHSncoAcatkRAkDAqvV6qIjlqJyOrcV2VHKBOF Z5WR3aGPVBG5HdmhL+MzaMmbUaCf/VGXaNI1kZbNRQ8qf+gF7z/EdqKAcTcEFG1yn/ +5TQ5DY7vBiMiWgAotNiVQ41+MN105HGugMmEt8w= From: "steve+gcc at tecwec dot eu" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/104111] [DR2589] Concept evaluation depends on context where it was first checked Date: Thu, 22 Feb 2024 17:11:51 +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.0 X-Bugzilla-Keywords: accepts-invalid, rejects-valid, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: steve+gcc at tecwec dot eu X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D104111 Eric Estievenart changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |steve+gcc at tecwec dot eu --- Comment #9 from Eric Estievenart --- By the way, the following code exhibits another related weirdness, without access control being involved: ``` #include struct Op { void operator()( auto x ) const =3D delete; // want only explicit customization in scope }; struct S {}; static_assert( !std::invocable ); template<> void Op::operator()( S ) const {} // now Op is invocable on S static_assert( std::invocable ); // so should not fail ! but... ``` (https://godbolt.org/z/Wa6rxeMvP) Commenting the first assert makes the second suddenly pass... Quantum physicist would say "spooky action at a distance" ;-) Hope this helps, Best.=