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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to programmer00001h from comment #2)
> I actually wondered about reflection while reading the Itanium ABI recently,
> but apparently GCC can mangle the anonymous union in function parameters
> just fine:
> 
> #include<type_traits>
> #include<meta>
> struct T{union{};};
> 
> using anonymous =
> [:members_of(^^T,std::meta::access_context::unchecked())[0]:];
> 
> static_assert(std::is_union_v<anonymous>);
> 
> void foo(anonymous){}

Note, this line is invalid according to https://wg21.link/CWG3130 and patches
are pending review to reject that.

Reply via email to