[Bug c++/99518] trailing requires clause adds nonexistent reference declarator to function parameter

nickgray0 at brown dot edu gcc-bugzilla@gcc.gnu.org
Wed Mar 10 15:46:55 GMT 2021


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

--- Comment #1 from nickgray0 at brown dot edu ---
I just looked up the standard and it seems GCC is correct to reject the code
and Clang's implementation (which happily compiles the code) is incorrect. the
compound requirement requires the parenthesized expression (which in this case,
turns 'x' to int&) to satisfy the return type constraint.

Sorry for the false alarm.


More information about the Gcc-bugs mailing list