Skip to content

unamed variable reflection #1554

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

You must be logged in to vote

You're telling Glaze to treat Foo as an object, but you really want Foo to be treated as an array. So change value = object(... to value = array(....

Here's the full meta that should work:

template <>
struct glz::meta<Foo> {
        constexpr static auto value=array(&Foo::x,
                &Foo::y,
                &Foo::z);
};

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zxeth
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