https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108536
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108536
--- Comment #3 from Jonathan Wakely ---
Because a requires-clause is not just different syntax for enable_if, it works
differently. Different things are different.
If you want exactly the same behaviour as your enable_if version (which you
did
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108536
--- Comment #2 from hr.jonas.hansen at gmail dot com ---
I can see that, and that would work. But it really seems like a work-around? Is
there a reason for the difference in behavior?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108536
--- Comment #1 from Jonathan Wakely ---
This is not a bug, you've just transformed your working code to use a
requires-clause incorrectly.
This works fine:
template >
requires (!std::derived_from)
&& std::construct