
23 Feb
2010
23 Feb
'10
11:36 a.m.
Sebastian Redl wrote:
How do I represent outer_value and inner_value in this expression? It seems I can't simply put mpl::_1 and mpl::_2 there, since that gives me a static assertion failure (argument is not available). I think I have to put an apply somewhere in there, but I can't figure out where.
Sebastian
Not sure, but I would do something like typedef mpl::vector< A, B, C > m_vec; typedef mpl::sort< m_vec, boost::is_base_of< mpl::_1, mpl::_2 >
::type sorted_type;
typedef mpl::unique< sorted_type, boost::is_base_of< mpl::_1, mpl::_2 >
::type unique_type;
(untested, but I have the idea that it is close to what you would like it to do :-)) Cheers, Rutger