visit_struct icon indicating copy to clipboard operation
visit_struct copied to clipboard

Visitable init

Open NikolausDemmel opened this issue 6 years ago • 1 comments

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

NikolausDemmel avatar Feb 27 '19 19:02 NikolausDemmel

Thanks for the PR! I will look at this later and at adding some tests (and fixing appveyor)

cbeck88 avatar Feb 28 '19 19:02 cbeck88