https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122720
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah.
Note,
template for (constexpr auto mem : define_static_array(
nonstatic_data_members_of(^^T, ctx)))
won't work until https://github.com/cplusplus/CWG/issues/805 is somehow
addressed in the standard, for now you need either
template for (constexpr auto mem : (const std::span<const
info>)define_static_array(
nonstatic_data_members_of(^^T, ctx)))
or
static constexpr auto arr = define_static_array(nonstatic_data_members_of(^^T,
ctx));
template for (constexpr auto mem : arr)
or
template for (constexpr auto mem : [:
reflect_constant_array(nonstatic_data_members_of(^^T, ctx)) :] )
or (but not in GCC 16 because expansion stmts are still pre-CWG3044)
constexpr auto arr = define_static_array(nonstatic_data_members_of(^^T, ctx));
template for (constexpr auto mem : arr)