|
|
@ -211,10 +211,10 @@ inline decltype(auto) members() const { return std::tie(__VA_ARGS__); } \ |
|
|
|
inline decltype(auto) members() { return std::tie(__VA_ARGS__); } \
|
|
|
|
inline decltype(auto) members() { return std::tie(__VA_ARGS__); } \
|
|
|
|
static constexpr std::array<char, tser::detail::str_size(#__VA_ARGS__)> _memberNameData = [](){ \
|
|
|
|
static constexpr std::array<char, tser::detail::str_size(#__VA_ARGS__)> _memberNameData = [](){ \
|
|
|
|
std::array<char, tser::detail::str_size(#__VA_ARGS__)> chars{'\0'}; size_t _idx = 0; constexpr auto* ini(#__VA_ARGS__); \
|
|
|
|
std::array<char, tser::detail::str_size(#__VA_ARGS__)> chars{'\0'}; size_t _idx = 0; constexpr auto* ini(#__VA_ARGS__); \
|
|
|
|
for (char const* _c = ini; *_c; ++_c, ++_idx) if(*_c != ',' && *_c != ' ') chars[_idx] = *_c; return chars;}(); \
|
|
|
|
for (char const* _c = ini; *_c; ++_c, ++_idx) { if(*_c != ',' && *_c != ' ') chars[_idx] = *_c; } return chars;}(); \
|
|
|
|
static constexpr const char* _typeName = #Type; \
|
|
|
|
static constexpr const char* _typeName = #Type; \
|
|
|
|
static constexpr std::array<const char*, tser::detail::n_args(#__VA_ARGS__)> _memberNames = \
|
|
|
|
static constexpr std::array<const char*, tser::detail::n_args(#__VA_ARGS__)> _memberNames = \
|
|
|
|
[](){ std::array<const char*, tser::detail::n_args(#__VA_ARGS__)> out{ }; \
|
|
|
|
[](){ std::array<const char*, tser::detail::n_args(#__VA_ARGS__)> out{ }; \
|
|
|
|
for(size_t _i = 0, nArgs = 0; nArgs < tser::detail::n_args(#__VA_ARGS__) ; ++_i) { \
|
|
|
|
for(size_t _i = 0, nArgs = 0; nArgs < tser::detail::n_args(#__VA_ARGS__) ; ++_i) { \
|
|
|
|
while(Type::_memberNameData[_i] == '\0') _i++; out[nArgs++] = &Type::_memberNameData[_i]; \
|
|
|
|
while(Type::_memberNameData[_i] == '\0') {_i++;} out[nArgs++] = &Type::_memberNameData[_i]; \
|
|
|
|
while(Type::_memberNameData[++_i] != '\0'); } return out;}(); |
|
|
|
while(Type::_memberNameData[++_i] != '\0'); } return out;}(); |
|
|
|