From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AF90F3857C56; Wed, 5 Jan 2022 23:16:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF90F3857C56 From: "jengelh at inai dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103923] New: is_invocable inexplicably fails Date: Wed, 05 Jan 2022 23:16:17 +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.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jengelh at inai dot de 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: Wed, 05 Jan 2022 23:16:17 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103923 Bug ID: 103923 Summary: is_invocable inexplicably fails Product: gcc Version: 11.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jengelh at inai dot de Target Milestone: --- Input: #include #include #include #include struct T { struct K { bool operator=3D=3D(const K &) const { return 0; } bool operator<(const K &) const { return 0; } }; struct H { auto operator()(const K &) const { return 0; } }; std::unordered_map m; }; int main() { printf("%d\n", std::is_invocable_v); printf("%d\n", std::is_invocable_v); //T().m[T::K()]; // for extra fun } Output: GNU C++17 (SUSE Linux) version 11.2.1 20211124 [revision 7510c23c1ec53aa4a62705f0384079661342ff7b] (x86_64-suse-linux) compiled by GNU C version 11.2.1 20211124 [revision 7510c23c1ec53aa4a62705f0384079661342ff7b], GMP version 6.2.1, MPFR version 4.1.0-p7, MPC version 1.2.1, isl version isl-0.24-GMP 0 1 Expected output: 1 1 Expectation based on it being possible to invoke on a const H &: { T::H h; const T::H &hh =3D h; hh(T::K()); }=