3 ms·
define_aggregate(^^Pointers, nsdms(^^T) | std::views::transform([](std::meta::info member){ return data_member_spec(add_
by sph 2y ago
define_aggregate(^^Pointers,
nsdms(^^T)
| std::views::transform([](std::meta::info member){
return data_member_spec(add_pointer(type_of(member)),
{.name = identifier_of(member)});
}));
What operator is ^^type?
- diath 2y agohttps://isocpp.org/files/papers/P2996R4.html#the-reflection-operator https://isocpp.org/files/papers/P2996R4.html#the-reflection-...
- tialaramex 2y agoback in R4 this operator is spelled ^ but in the accepted draft it was spelled ^^
- tialaramex 2y agoThis is the reflection operator. The committee† spent some time bikeshedding different squiggles for this operator, but eventually it looks like ^^ won because it was least awful. † WG21 of SC22 of JTC1 between ISO and the IEC, "the C++ committee". See P2996R11 for the latest draft of the work - https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p2996r11.html#the-reflection-operator https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/p29...