Closed rbock closed 3 years ago
template<typename T>
constexpr auto copy_member_semi_direct(T&& t)
{
return [< reflexpr(t.m) >];
// ^^^
//error: reflection reflects an expression which is not constexpr
}
Hey, so, this could work in the future, but as it stands we don't really reflect and splice expressions. For the moment things are still focused on entities, so you can successfully rewrite this as:
template<typename T>
constexpr auto copy_member_semi_direct(T&& t)
{
return [< reflexpr(t) >].m;
// or
return [< reflexpr(t) >].[< reflexpr(X::m) >];
}
Thanks! That gives me some food for thought :-)
Hi,
While playing with the new splice syntax, I noticed that reflecting data members of objects does not seem to work?