https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124628
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |mpolacek at gcc dot gnu.org
Keywords| |error-recovery
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is ICE during error recovery, the ctors/dtors don't have type, so type_of
throws but we for some reason try to mangle the f instantiations anyway even
when they don't have valid template argument.
But changing it to
template<typename T>
void g() {
template for (constexpr auto mem :
std::define_static_array(std::meta::members_of(^^T,
std::meta::access_context::current())))
if constexpr (!is_constructor(mem) && !is_destructor(mem))
f<typename [:std::meta::type_of(mem):]>();
}
In that case the ICEs is on trying to mangle
constexpr auto f() [with T = X&(X&&) noexcept (<uninstantiated>)]
and guess the problem is in that uninstantiated noexcept, Don't know what
should try to instantiate it though, whether type_of or when trying to
instantiate f, something else?