Boost logo

Boost :

Subject: Re: [boost] [utility] Any interest for a macro which automatically creates default move-semantics, comparisson etc for a class
From: Bjorn Reese (breese_at_[hidden])
Date: 2013-11-09 06:33:50

On 11/08/2013 04:29 PM, Viktor Sehr wrote:
> Is it possible to do this without having to specify a base class ('member')
> for the variables?

Yes, there are two possibilities.

First, you can define the member variables outside the class and let
the class inherit the member variables.

Second, you can declare the class and its member variables as normal,
and then use BOOST_FUSION_ADAPT_STRUCT after the class definition to
add reflection. However, this requires you to specify the member
variables twice (in the class and in the adapter.)

Boost list run by bdawes at, gregod at, cpdaniel at, john at