12#include <boost/static_assert.hpp>
14#include <boost/mpl/begin_end.hpp>
15#include <boost/mpl/deref.hpp>
16#include <boost/mpl/iterator_category.hpp>
17#include <boost/mpl/iterator_tags.hpp>
18#include <boost/mpl/next_prior.hpp>
19#include <boost/mpl/or.hpp>
21#include <boost/type_traits/is_same.hpp>
45template <
typename ForwardIt>
49 typedef typename boost::mpl::iterator_category<ForwardIt>::type
category;
60template <
typename Iterator>
64 typename boost::mpl::iterator_category<Iterator>::type,
65 boost::mpl::bidirectional_iterator_tag>,
67 typename boost::mpl::iterator_category<Iterator>::type,
68 boost::mpl::random_access_iterator_tag>
82template <
typename Sequence>
93template <
typename Sequence>
104template <
typename ForwardIt>
106 : deref<ForwardIt> { };
109template <
typename ForwardIt>
114template <
typename ForwardIt>
Exists to inject functionality into the Boost MPL namespace.
Exists to inject functionality into the Boost namespace.
Encapsulate solution for Exercise 7-7.
Grab a reverse_iterator from the a sequence directly.
prior< typenameend< Sequence >::type >::type first_iterator
BOOST_STATIC_ASSERT((exercise_7_7::is_valid_reverse_category< first_iterator >::value))
exercise_7_7::reverse_iterator< first_iterator > type
Acquire a reverse_iterator at the end of a sequence.
BOOST_STATIC_ASSERT((exercise_7_7::is_valid_reverse_category< end_iterator >::value))
prior< typenamebegin< Sequence >::type >::type end_iterator
exercise_7_7::reverse_iterator< end_iterator > type
Determines if the source iterator is suitable for reversal.
Wraps any iterator with the intent of reversing the direction of next and prior.
reverse_iterator< ForwardIt > type
boost::mpl::iterator_category< ForwardIt >::type category