14#include <boost/mpl/pop_back.hpp>
15#include <boost/mpl/push_back.hpp>
42 typedef boost::mpl::bidirectional_iterator_tag
category;
53template <
typename T,
typename Next>
59 typedef boost::mpl::void_
next;
60 typedef boost::mpl::void_
prev;
68template <
typename T,
size_t N,
typename Next>
109template <
typename S,
typename S_Prev>
135 template <
typename S>
141 typename S::prev>::type
150 template <
typename S>
161 template <
typename S>
struct apply;
163 template <
typename T,
size_t N>
174 template <
typename S,
size_t N>
175 struct apply_num { };
178 template <
typename T,
size_t N>
185 template <
typename S,
typename Elem>
186 struct apply : apply_num<S, Elem::value> { };
Solution to Exercise 5-6.
Exists to inject functionality into the Boost MPL namespace.
Exists to inject functionality into the Boost namespace.
Encapsulate solution for Exercise 5-7.
exercise_5_7::dimensions_b_iterator< typename exercise_5_7::begin_impl_traversal< S, typename S::prev >::type > type
exercise_5_7::dimensions_b_iterator< boost::mpl::void_ > type
exercise_5_7::dimensions_b_iterator< typename S::next > type
exercise_5_7::dimensions_b< T > type
exercise_5_7::dimensions_b_iterator< typename S::prev > type
exercise_5_7::dimensions_b< T[N]> type
begin_impl_traversal walks the list to find the beginning
boost::mpl::if_< boost::is_array< T >, dimensions_b_impl< T, dimensions_b_impl< T[N], Next > >, boost::mpl::void_ >::type prev
Implement the dimensions_b sequence.
Define a bi-directional iterator for our dimensions_b sequence.
boost::mpl::bidirectional_iterator_tag category
A tag for tag-dispatched sequence metafunctions.
Represent the dimensions in an array type as a sequence of numbers.