Forwarding ctor calls in fusion sequence
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 ?
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@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Joel Falcou
-
Thomas Heller