12#include <boost/mpl/begin_end.hpp>
13#include <boost/mpl/deref.hpp>
14#include <boost/mpl/iterator_tags.hpp>
15#include <boost/mpl/next_prior.hpp>
17#include <boost/type_traits/is_array.hpp>
18#include <boost/type_traits/is_same.hpp>
64template <
typename T,
size_t N>
67 static size_t const value = N;
72 typedef typename boost::mpl::if_<
85 typedef boost::mpl::forward_iterator_tag
category;
101 template <
typename S>
111 template <
typename S>
129 typedef typename boost::mpl::if_<
130 boost::is_same<boost::mpl::void_, S>,
Exists to inject functionality into the Boost MPL namespace.
Exists to inject functionality into the Boost namespace.
Encapsulate solution for Exercise 5-6.
exercise_5_6::dimensions_iterator< S > type
exercise_5_6::dimensions_iterator< boost::mpl::void_ > type
boost::mpl::if_< boost::is_same< boost::mpl::void_, S >, exercise_5_6::dimensions_iterator< boost::mpl::void_ >, exercise_5_6::dimensions_iterator< typenameS::tail > >::type type
boost::mpl::if_< boost::is_array< T >, dimensions< T >, boost::mpl::void_ >::type tail
The rest of the sequence.
Define a (forward-only) iterator for our dimensions sequence.
boost::mpl::forward_iterator_tag category
A tag for tag-dispatched sequence metafunctions.
Represent the dimensions in an array type as a sequence of numbers.