Nevermind.
Removing the typename before mpl::fold fixes it.
Kind regards,
Peter
//-------------------------------------
#include
#include
#include
#include
#include
#include
namespace mpl = boost::mpl;
struct tag1 {};
struct tag2 {};
template <typename T>
struct is_tag1 : boost::false_type {};
template <>
struct is_tag1<tag1> : boost::true_type {};
int main()
{
typedef mpl::vector<
mpl::pair >,
mpl::pair >,
mpl::pair >
> initial_vector;
typedef mpl::fold<
initial_vector,
mpl::pair, mpl::vector<> >,
mpl::if_<
is_tag1mpl::_2 >,
mpl::push_back<
mpl::firstmpl::_1,
mpl::secondmpl::_2
>,
mpl::push_back<
mpl::secondmpl::_1,
mpl::secondmpl::_2
>
>
>::type sorted_pair;
return 0;
}