
20 Aug
2009
20 Aug
'09
12:06 a.m.
I have a problem with boost.fusion I can't figure out from the documentation. consider the following example: template<class Vector> ? function(Vector vec){ return fusion::push_back(vec,123); } what is the return type ? the return type is supposed to be a random access sequence, so result_of::push_back<Vector,int>::type is not an option, because push_back only returns a forward sequence. so I have to construct a new vector from the view that push_back returns. if Vector was vector<char,short> I need to find the type vector<char,short,int>, preferrably without an own MPL algorithm since this is only a simple test case, the real return type is much more complex and based on more than one transformation function. thank you