1

Just starting to look at boost MPL, say I have 2 vectors that I want to combine, is it possible with the boost MPL or do I need to write the code myself?

Say I have:

typedef vector<Class0, Class1, Class2, Class3> vec1;
typedef vector<Class4, Class5, Class6, Class7> vec2;

I did try push_back but I do not get the expected result:

typedef push_back<vec1, vec2>::type combinedVec;

What I end up with doing the above is a vector as follow:

vector<Class0, Class1, Class2, Class3, vector<Class4, Class5, Class6, Class7>>

What I want instead is:

vector<Class0, Class1, Class2, Class3, Class4, Class5, Class6, Class7>

Any help will be appreciated

CJCombrink
  • 3,738
  • 1
  • 22
  • 38

0 Answers0