visit_struct
visit_struct copied to clipboard
Visitable init
Implements VISITABLE_INIT (copy initialization) and VISITABLE_DIRECT_INIT (direct initialization). See #13 for discussion.
Example usage:
struct FooBar {
BEGIN_VISITABLES(FooBar);
VISITABLE(std::string, foo);
VISITABLE_INIT(bool, foo, true);
VISITABLE_DIRECT_INIT(std::vector<int>, foo, {1, 2, 3});
END_VISITABLES;
};
What is maybe missing are unit tests and readme update.
Fixes #13
Thanks for the PR! I will look at this later and at adding some tests (and fixing appveyor)