C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
exercise-7-3.hpp
Go to the documentation of this file.
1// ===-- chapter-7/exercise-7-3.hpp ----------------------- -*- C++ -*- --=== //
9#ifndef EXERCISE_7_3
10#define EXERCISE_7_3
11
12#include <boost/mpl/advance.hpp>
13#include <boost/mpl/begin_end.hpp>
14#include <boost/mpl/iterator_range.hpp>
15#include <boost/mpl/joint_view.hpp>
16
17
42namespace exercise_7_3 {
43
53template <typename S, typename Offset>
55 : boost::mpl::joint_view<
56 boost::mpl::iterator_range<Offset, typename boost::mpl::end<S>::type>,
57 boost::mpl::iterator_range<typename boost::mpl::begin<S>::type, Offset>
58 >
59{ };
60
61} // namespace exercise_7_3
62
63#endif // EXERCISE_7_3
Encapsulate solution for Exercise 7-3.
A shifted and wrapped view onto the original sequence.