Search code examples
c++boostboost-mpl

How to "concatenate" boost::mpl::vectors


I have to different vectors

mpl::vector<Type1, Type2...>
mpl::vector<Type3, Type4...>

I'd like to "concatenate" them to form:

mpl::vector<Type1, Type2, Type3, Type4...>

This would allow me to prepare vector templates and reuse them afterwards. There are different solutions to my problem, but this approach seems most appropriate to me.

Thanks...


Solution

  • The libaray native supported function boost::mpl::joint_view is probably a better choice. It is optimized and lazy-evaluated.

    http://www.boost.org/doc/libs/1_55_0/libs/mpl/doc/refmanual/joint-view.html