How to fill boost::fusion::vector at runtime?
Firstly, apologies for the similarity to my previous question here , but I don't think I asked the right thing. I have a method: template <typename T> void some_method( T &t) {...} which takes a type fusion::vector<T1, T2, T3, ..., Tn> to be determined at runtime - e.g. vector<int, double> in one call and vector<int, double, int> in another. I want to fill this vector dynamically with something like: int blah = 5; for(int i = 0; i<size(t); i++){ at_c<i>(t) = blah; } This doesn't work since at_c expects a const . I've tried other stuff (see the previous question) but still can't work out how to