C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
chapter7::permutation_view< Indices, Sequence > Struct Template Reference

Alter the order sequence traversal using a sequence of positions. More...

#include <chapter-7-permutation_view.hpp>

Public Types

typedef Indices indices
 
typedef Sequence orig_sequence
 
typedef permutation_view_tag tag
 

Detailed Description

template<typename Indices, typename Sequence>
struct chapter7::permutation_view< Indices, Sequence >

Alter the order sequence traversal using a sequence of positions.

mpl::list_c<int,2,1,3,0,2>, // indices
mpl::vector_c<int,11,22,33,44> // elements
>
Alter the order sequence traversal using a sequence of positions.

...yields a sequence, [33,22,44,11,33].

Template Parameters
IndicesA sequence of indices into the "data" sequence. The iterator traverses this sequence and presents elements from the other sequence. The same index may be specified twice. An index outside the bounds of Sequence results in undefined behavior.
SequenceThe data sequence to present when iterators are dereferenced.

Definition at line 73 of file chapter-7-permutation_view.hpp.

Member Typedef Documentation

◆ indices

template<typename Indices , typename Sequence >
typedef Indices chapter7::permutation_view< Indices, Sequence >::indices

Definition at line 75 of file chapter-7-permutation_view.hpp.

◆ orig_sequence

template<typename Indices , typename Sequence >
typedef Sequence chapter7::permutation_view< Indices, Sequence >::orig_sequence

Definition at line 76 of file chapter-7-permutation_view.hpp.

◆ tag

template<typename Indices , typename Sequence >
typedef permutation_view_tag chapter7::permutation_view< Indices, Sequence >::tag

Definition at line 78 of file chapter-7-permutation_view.hpp.


The documentation for this struct was generated from the following file: