[...]
Thanks, iterator_range works fine. What's not very nice to me is the T typename is lost for empty
sequence and after using a metafunction, so vector_c is not really usable for metaprograming, its
just a macro to easier define a vector.
Well... Type never gets lost in C++ ;)
What about:
typedef mpl::vector_c my_vector;
BOOST_MPL_ASSERT(( is_same< mpl::front::type::value_type, float > ));
vector_c initializes a vector with integral_c derived type (like mpl::int_ or mpl::bool_) and
value specified, so in this example we have most probably an mpl::vector of integral_c,..., integral_c.
Anyway applying a front metafunction to any element of vector will return some integral_c specification. Since you are interested in type contained in integral_c you can access it via
integral_c::value_type. Therefore:
mpl::front::type::value_type
^^^^ ^^^^^ + => integral_c::value_type
+ => integral_c
result in correct type resolution stored in mpl::vector.
Hope that helps.
With Kind Regards,
Ovanes Markarian