You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structMyStruct { int a = 1; };
structMyStruct2 : publicMyStruct { int b = 2; };
MyStruct2 data{};
ylt::reflection::for_each(data, [&](auto& value, auto name) {
std::cout << name << ": " << value << std::endl;
});
这种情景编译都无法通过。就算对
MyStruct
和MyStruct2
都加上YLT_REFL
宏,也要求派生类那边的宏把基类的成员也都加上才行。有没有稍微简单点的办法来支持派生类呢The text was updated successfully, but these errors were encountered: