
7 Jul
2008
7 Jul
'08
4:25 p.m.
AMDG oliver wrote:
what i really wanna do is not to name the objects i put i the fusion vector. they should be constructed in place and only be accessed through the fusion vector. should look something like this:
typedef boost::fusion::vector<JobA, JobB, JobC> tJobs; struct System { System(Da& da) : fJobs(JobA(da), JobB(da, 2), JobC(da, 3)) {} private: tJobs fJobs; };
This exact syntax cannot be implemented without a copy constructor. JobA(da) creates a temporary JobA which is then copied into the fusion::vector. You would have to use something like fJobs(boost::in_place(da), boost::in_place(da, 2), boost::in_place(da, 3)) In Christ, Steven Watanabe