[Bug c++/111357] __integer_pack fails to work with values of dependent type convertible to integers in noexcept context
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111357 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-09-10 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski --- Reduced slightly: ``` #include using std::integer_sequence; using std::make_integer_sequence; template void g(integer_sequence) {} template struct c1 { static constexpr int value = 1; constexpr operator int() { return value; } }; template struct R { using S = make_integer_sequence{}>; R() noexcept(noexcept(g(S( {} }; int main() { R(); } ``` The obvious workaround in this case (and the tuple_size case) is to use `::value` (or tuple_size_v ).
[Bug c++/111357] __integer_pack fails to work with values of dependent type convertible to integers
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111357 --- Comment #1 from Andrew Pinski --- The front-end does: hi = instantiate_non_dependent_expr (hi, complain); hi = cxx_constant_value (hi, complain); int len = valid_constant_size_p (hi) ? tree_to_shwi (hi) : -1;