C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
Chapter 7: Views and Iterators Adaptors

"This chapter covers the user of sequence views." More...

Modules

 Exercise 7-0
 Use zip_view.
 
 Exercise 7-1
 Why use transform_view?
 
 Exercise 7-2
 Modify zip_iterator category to be "least refined.".
 
 Exercise 7-3
 Implement rotate_view sequence view.
 
 Exercise 7-4
 Create permutation_iterator.
 
 Exercise 7-5
 Change permutation_iterator traversal.
 
 Exercise 7-6
 Create permutation_view from permutation_iterator.
 
 Exercise 7-7
 Create a reverse view and iterator.
 
 Exercise 7-8
 Create crossproduct_view.
 

Files

file  chapter-7-permutation_view.hpp
 Defines a view of a sequence that appears to alter the elements' order.
 
file  chapter-7-zip_view.hpp
 "Zip" corresponding elements of N arrays into a sequence of N-length subsequences.
 
file  chapter-7.cpp
 Test application for Chapter 7.
 

Namespaces

namespace  chapter7
 Provide utilities availble to all Chapter 7 solutions.
 

Classes

struct  boost::mpl::begin_impl< chapter7::permutation_view_tag >
 Load an iterator with the beginning to both sequences. More...
 
struct  boost::mpl::end_impl< chapter7::permutation_view_tag >
 An iterator with the end of the indices sequence and the beginning of the other. More...
 
struct  boost::mpl::deref< chapter7::permutation_iterator< CurIdxIter, SeqBegin > >
 Advance the prescribed amount, and return the element found. More...
 
struct  boost::mpl::next< chapter7::permutation_iterator< CurIdxIter, SeqBegin > >
 Advance only the index iterator. More...
 
struct  boost::mpl::prior< chapter7::permutation_iterator< CurIdxIter, SeqBegin > >
 Move only the index iterator. More...
 
struct  boost::mpl::next< chapter7::zip_iterator< IteratorSeq, Category > >
 Creates a sequence of the next element for each (sub-)iterator. More...
 
struct  boost::mpl::advance< chapter7::zip_iterator< IteratorSeq, random_access_iterator_tag >, N >
 Creates a sequence from the result of boost::mpl::advance. More...
 
struct  boost::mpl::at_impl< chapter7::zip_view_tag >
 Create a sequence from the result of boost::mpl::at. More...
 
struct  boost::mpl::prior< chapter7::zip_iterator< IteratorSeq, Category > >
 Specialize prior, but only for bidirection or better iterator types. More...
 

Detailed Description

"This chapter covers the user of sequence views."

C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond.

Author
Matt Bisson
Since
5/15/2014