
On 11/06/2013 06:38 PM, Viktor Sehr wrote:
Example usage: class Foo { public: Foo() {} DEFAULT_EVERYTHING(Foo, ( (int)(a) ) ( (std::vector<int>)(b) ) ( (float)(c) ) ); };
Any interest, suggestions or ideas?
(vector2
(member, other.member)), swap_functor()); }
If we are going to specify the member variables in a funny way, it may
be worth considering a solution based on Boost.Fusion. For example,
swap() can be made like this:
class Foo {
public:
Foo()
{
member.a = 0;
member.c = 0.0;
}
// swap and swap_functor should be turned into a macro
public:
void swap(Foo& other)
{
using namespace boost::fusion;
for_each(zip_view< vector2