Boost logo

Boost Users :

From: Yuval Ronen (ronen_yuval_at_[hidden])
Date: 2007-01-17 02:49:01


Joel de Guzman wrote:
> Yuval Ronen wrote:
>
>> I want the ability to have the elements be constructed with any number
>> of arguments. Two is just in this specific case...
>>
>>> So, I have no immediate ideas for you. If you have
>>> some specific suggestions, I'm all ears.
>> I don't have any ideas, except maybe somehow use
>> boost::in_place_factory, but that's as specific as I can get... I do
>> think, though, that it's a valuable feature for fusion, for types that
>> don't have default constructors, or are non-copyable.
>
> Agreed. You got me thinking. The easiest I can think of is:
>
> a_tuple t(apply_for_each(val1, val2,... val3));
>
> where apply_for_each signals the constructor to construct its
> elements using the supplied args.
>
> This would be a major undertaking though since we have to do
> this for all sequences in there. Perhaps there's an easier
> solution. I'm saving this one for future reference.

I keep my fingers crossed for you... :)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net