[Bug c++/106734] [requires] std::same_as in compound requirements doesn't produce expected result

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Aug 24 14:00:18 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106734

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to jakob from comment #0)
>     Bar bar;
>     constexpr bool same = requires
>     {
>         { bar } -> std::same_as<Bar>;

This is false. The type of decltype((bar)) is Bar&.

So I think GCC is correct.


More information about the Gcc-bugs mailing list