How to push back value to fusion vector during runtime?
typedef boost::fusion::vector<A*, B*, C*> vec_t;
vec_t vec_;
vec_.push_back(new A());
How to push back value to fusion vector during runtime?
typedef boost::fusion::vector<A*, B*, C*> vec_t;
vec_t vec_;
vec_.push_back(new A());
The sequence operations that are done on a fusion::vector
are all compile-time-only. Once the type has been computed at compile time, a fusion::vector
becomes no more than a tuple.
If you want a run-time mutable vector then you should use std::vector
.