|
Boost : |
From: Eric Niebler (eric_at_[hidden])
Date: 2007-06-14 14:34:31
Tobias Schwinger wrote:
> Eric Niebler wrote:
>>>> Is the sort of thing you are looking for?
>>>>
>>>> fused_ctor<T> fc;
>>>> T t = fc(sequence);
>>
>> Yes, that's the thing.
>
> OK, but why duplicate the unpacking of the Sequence?
>
> All it takes is yet another adapter encapsulating a type's ctor(s) in a
> function object to just use fusion::(invoke|fused)_function_object. E.g:
>
<snip>
>
> Client code (at function scope):
>
> invoke_function_object( ctor<my_class>(), argseq );
Yes, that's exactly it. Now, put it in Fusion so I don't have to write a
function object with N overloads. :-)
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk