Boost logo

Boost :

From: Daniel Wallin (dalwan01_at_[hidden])
Date: 2006-02-11 07:15:31


Cromwell Enage wrote:
> --- Daniel Wallin wrote:
>> 1.34 will feature new macros in Boost.Parameter that
>> have a significantly improved interface. Some of the
>> syntax is demonstrated in this test:
>>
> http://cvs.sourceforge.net/viewcvs.py/*checkout*/boost/boost/libs/parameter/test/preprocessor.cpp
>
> Wonderful!
>
> I'm curious as to how one would pass initializer lists
> to a Boost.Parameter enabled constructor. It looks
> like s/he would have to create a base class that
> handles all the initialization while the derived
> class, which is the frontend, passes on the arguments.
> Am I right?

Yes, that's correct. I see two options for the constructor macros:

  1) Delegate to base class constructor.
  2) Two-step construction by delegating to init() member function.

At this point only the first one is supported, because it's generally
just a better way. I was going to implement the second one too, but I
don't know if I have time and I'm not prioritizing it.

-- 
Daniel Wallin

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk