[Bug c++/67595] concepts code causes segfault
Casey at Carter dot net
gcc-bugzilla@gcc.gnu.org
Mon Oct 30 15:09:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67595
--- Comment #5 from Casey Carter <Casey at Carter dot net> ---
The original program submission is ill-formed due to the requirement on line
270 being poorly designed:
requires std::is_same<decltype(x - (x - x)), decltype(x += (x - x))>::value;
for a random access iterator x, "x - (x - x)" is typically a prvalue of the
same type as x, whereas "x += (x - x)" is typically an lvalue of that type. X
and X& are obviously not the same type.
More information about the Gcc-bugs
mailing list