[Bug c++/87389] if constexpr not working properly with static_assert

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 21 21:40:00 GMT 2018


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is ill-formed. 

if constexpr in main() doesn't work the way you want, because there's nothing
dependent (there is no possible version of the code where the condition will be
true, so the program is ill-formed).


More information about the Gcc-bugs mailing list