|
Boost : |
From: Eric Niebler (eric_at_[hidden])
Date: 2007-06-14 10:53:26
Hartmut Kaiser wrote:
>
> dan marsden wrote:
>
>>> I have a Fusion sequence. I want to create an object of type T using
>>> the elements of the sequence as arguments to the
>> constructor. Is there
>>> an easy way? I can't tell my looking at the docs. I looked
>> at the stuff
>>> in fusion/functional and couldn't find what I was looking for.
>
> Isn't that exactly what a Phoenix actor does?
Hartmut, are you saying this functionality has no place in Fusion?
>> I don't think we've got anything that supports this directly
>> at the moment.
>> Is the sort of thing you are looking for?
>>
>> fused_ctor<T> fc;
>> T t = fc(sequence);
>>
>> Where fused_ctor::operator()(Seq const&) breaks up the
>> sequence into args for the T ctor.
Yes, that's the thing.
>> If thats the sort of thing, I think we should have something
>> like this, I can cook something up over the next few days,
>> once I've worked through a bit of my backlog :)
>>
>> Of course I may have missed an existing feature, which my
>> co-authors might pick me up on...
Thanks, Dan. FWIW, I have my own solution for this now, so there's no
rush. But I'm sure it'd come in handy eventually.
-- 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