Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for non-aggregate initializable struct #192

Open
bansan85 opened this issue Nov 21, 2024 · 0 comments
Open

Add support for non-aggregate initializable struct #192

bansan85 opened this issue Nov 21, 2024 · 0 comments

Comments

@bansan85
Copy link

Glaze uses a trick to support non-aggregate initializable struct:

template <>
struct glz::meta<my_struct> {
   using T = my_struct;
   static constexpr auto value = object(
      &T::i,
      &T::d,
      &T::hello,
      &T::arr,
      &T::map
   );
};

Maybe pfr could use something like that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant