https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107861
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Right, this is by design and I don't think it is a bug. The reasoning is the C++ constant expressions have a way of requiring you to having to figure out if it was going to overflow and cause different behavior (of well defined code) at compile time. There is most likely a way to get a subsitutation failure with the overflow too. I tried with C++20 concepts but I am not so good at it.