C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches

Create permutation_view from permutation_iterator. More...

Namespaces

namespace  test_7_6
 Tests functionality from Exercise 7-6.
 
namespace  test_7_7
 Tests functionality from Exercise 7-7.
 

Detailed Description

Create permutation_view from permutation_iterator.

7-6. Implement a permutation_view using your permutation iterator adaptor, so
     that:

permutation_view<
    mpl::list_c<int,2,1,3,0,2>,      // indices
    mpl::vector_c<int,11,22,33,44> > // elements

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