Skip to content

Expanding the quoted_t to arrays/nested arrays #261

Closed Answered by stephenberry
raddy asked this question in Q&A
Discussion options

You must be logged in to vote

@raddy, support has been added with #263

You can now register higher level objects and arrays and the underlying values will be quoted.

For your use case, see how the std::vector is registered:

struct A
{
   double x;
   std::vector<uint32_t> y;
};

template <>
struct glz::meta<A>
{
   static constexpr auto value = object("x", glz::quoted<&A::x>(), "y", glz::quoted<&A::y>());
};

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by stephenberry
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants