
14 Jun
2007
14 Jun
'07
6:34 p.m.
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