Questions tagged [boost-describe]

6 questions
2
votes
1 answer

How to convert a struct that includes an enum member to JSON with Boost Describe?

In the documentation of Boost Describe, there is an example for automatic conversion of a struct to JSON. However, when adding an enum (not a nested one) as a member of the struct, the code example does not work. I guess that the tag_invoke function…
Koija
  • 35
  • 4
2
votes
1 answer

How to call a parameterless function using boost::json::value

I'm modifying from here code: #include #include #include #include #include #include #include…
Kargath
  • 450
  • 5
  • 15
1
vote
1 answer

boost::describe: Can I add annotations to types and/or members?

Is it possible, using the boost::describe library, to add additional information about a given type or member? For instance, if I have a class described like this: BOOST_DESCRIBE_STRUCT(Foo, (), (bar, baz)) Is there any way to add some kind of…
1
vote
1 answer

How to convert a struct that includes a pointer member to JSON with Boost Describe

In the documentation of Boost Describe, there is an example for automatic conversion of a struct to JSON (https://www.boost.org/doc/libs/1_78_0/libs/describe/doc/html/describe.html#example_to_json). However, when adding a pointer as a member of the…
Koija
  • 35
  • 4
1
vote
1 answer

BOOST_DEFINE_ENUM_CLASS and json

In the documentation for boost describe, under the heading "Automatic Conversion to JSON", it shows how to implement "a universal tag_invoke overload that automatically converts an annotated struct to a Boost.JSON value". The example supports…
0
votes
0 answers

How do I describe a constructor with boost::describe?

The boost::describe library works when defining reflection info for member functions and variables, but is it possible to describe constructors?