From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C01AF385482C; Tue, 3 Nov 2020 16:13:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C01AF385482C From: "gcc-bugs at marehr dot dialup.fu-berlin.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97704] New: [11 Regression][concepts] Not working with explicit types in function signatures? Date: Tue, 03 Nov 2020 16:13:06 +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.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gcc-bugs at marehr dot dialup.fu-berlin.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: Tue, 03 Nov 2020 16:13:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97704 Bug ID: 97704 Summary: [11 Regression][concepts] Not working with explicit types in function signatures? Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de Target Milestone: --- Hi gcc-team, consider the following program: ```c++ struct non_exisiting {}; template auto hard_error(t in) { static_assert(in, "Failure"); return; } template requires requires { hard_error(t{}); } constexpr auto foo(t, non_exisiting); template constexpr auto foo(t, bool) { return false; }; int main() { foo(0, false); }; ``` This worked since at least g++-7 up until g++-10.2, works with clang (11 and trunk), as well as msvc. I would expect that `foo(t, non_exisiting)` will not be considered, because= it would not be meaningful in this case (`bool` is not of type `non_exisiting`= and there is no conversion sequence from `bool` to `non_exisiting`). See https://godbolt.org/z/3W5eG8 I hope this is a bug and not intended behaviour, because I encountered this problem by using a range adaptor from the stdlib inside a templated class w= hich all of a sudden found `operator|` (a hidden friend of that range adaptor) by ADL even though that operator did not match signature-wise. If this is intended behaviour, what in world is the type of the second parameter of `foo(t, non_exisiting)`? Thank you!=