C++ Template Metaprogramming
Solutions to the exercises throughout the book
|
Encapsulate solution for Exercise 7-0. More...
Typedefs | |
typedef boost::mpl::vector_c< int, 1, 3, 5, 7 > | v1 |
typedef boost::mpl::vector_c< int, 2, 4, 6, 8 > | v2 |
typedef boost::mpl::vector< v1, v2 > | zip_vec |
typedef boost::mpl::fold< zip_view< zip_vec >, boost::mpl::vector<>, boost::mpl::copy< _2, boost::mpl::back_inserter< _1 > > >::type | folded |
typedef boost::mpl::vector_c< int, 1, 2, 3, 4, 5, 6, 7, 8 > | expected_results |
Functions | |
BOOST_STATIC_ASSERT ((boost::mpl::equal< expected_results, folded >::value)) | |
Encapsulate solution for Exercise 7-0.
typedef boost::mpl::vector_c<int, 1, 2, 3, 4, 5, 6, 7, 8> exercise_7_0::expected_results |
Definition at line 53 of file exercise-7-0.hpp.
typedef boost::mpl::fold<zip_view<zip_vec>,boost::mpl::vector<>,boost::mpl::copy<_2,boost::mpl::back_inserter<_1>>>::type exercise_7_0::folded |
Definition at line 51 of file exercise-7-0.hpp.
typedef boost::mpl::vector_c<int, 1, 3, 5, 7> exercise_7_0::v1 |
Definition at line 43 of file exercise-7-0.hpp.
typedef boost::mpl::vector_c<int, 2, 4, 6, 8> exercise_7_0::v2 |
Definition at line 44 of file exercise-7-0.hpp.
typedef boost::mpl::vector<v1, v2> exercise_7_0::zip_vec |
Definition at line 45 of file exercise-7-0.hpp.
exercise_7_0::BOOST_STATIC_ASSERT | ( | (boost::mpl::equal< expected_results, folded >::value) | ) |