|
Boost Users : |
Subject: Re: [Boost-users] Forwarding ctor calls in fusion sequence
From: Thomas Heller (thom.heller_at_[hidden])
Date: 2012-05-07 09:37:45
On 05/07/2012 03:11 PM, Joel Falcou wrote:
> Say I have a fusion vector of different types with a constructor
> taking an int.
> eg:
>
> fusion::vector< std::vector<double>, std::vector<int> >
>
> and I have such a type as a member of a class foo.
> Now class foo has a constructor taking an int and I want to
> forward this parameter to all constructor of my fusion sequence
> member.
>
> Is there a C++03 way to do this with minimal amount of copying ?
>
Here is my very limited attempt without all the Boost.Preprocessor mumbo
jumbo:
https://gist.github.com/2627795
If your sequence is move enabled (move ctor and move assignment,
possibly trivial) this should create your minimal amount of copies
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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