0

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());
manlio
  • 18,345
  • 14
  • 76
  • 126
Bryan Fok
  • 3,277
  • 2
  • 31
  • 59
  • 3
    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`. – Mankarse Apr 20 '13 at 06:36

1 Answers1

2

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.

Mankarse
  • 39,818
  • 11
  • 97
  • 141