GCC rejects this code with an error:
template <bool flag> void f() { if constexpr (flag) { } else { static_assert(false); } } void g() { f<true>(); }
I believe compilation should succeed.
Seen with gcc-c++-11.5.0-5.el9_5.x86_64.
GCC rejects this code with an error:
template <bool flag> void f() { if constexpr (flag) { } else { static_assert(false); } } void g() { f<true>(); }
I believe compilation should succeed.
Seen with gcc-c++-11.5.0-5.el9_5.x86_64.