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

Tests functionality from Exercise 7-2. 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, v2zip_vec
 
typedef chapter7::zip_view< zip_veczip_vec_t
 
typedef chapter7::least_refined_iterator_category< zip_vec >::type zip_vec_category
 
typedef boost::mpl::begin< zip_vec_t >::type zv_begin
 
typedef boost::mpl::deref< zv_begin >::type zv_begin_t
 
typedef boost::mpl::next< zv_begin >::type zv_next
 
typedef boost::mpl::prior< zv_next >::type zv_prior
 
typedef boost::mpl::at< zip_vec_t, boost::mpl::int_< 2 > >::type zv_at2
 
typedef boost::mpl::advance< zv_next, boost::mpl::int_< 2 > >::type zv_at3
 
typedef boost::mpl::list_c< int, 1, 3, 5, 7 > l1
 
typedef boost::mpl::list_c< int, 2, 4, 6, 8 > l2
 
typedef boost::mpl::list< l1, l2zip_list
 
typedef chapter7::least_refined_iterator_category< zip_list >::type zip_list_category
 

Functions

 BOOST_STATIC_ASSERT ((boost::is_same< zip_vec_category, boost::mpl::random_access_iterator_tag >::value))
 
 BOOST_STATIC_ASSERT ((boost::mpl::equal< zv_begin_t, boost::mpl::vector_c< int, 1, 2 > >::value))
 
 BOOST_STATIC_ASSERT ((boost::mpl::equal< boost::mpl::deref< zv_next >::type, boost::mpl::vector_c< int, 3, 4 > >::value))
 
 BOOST_STATIC_ASSERT ((boost::is_same< zv_prior, zv_begin >::value))
 
 BOOST_STATIC_ASSERT ((boost::mpl::equal< boost::mpl::deref< zv_prior >::type, boost::mpl::vector_c< int, 1, 2 > >::value))
 
 BOOST_STATIC_ASSERT ((boost::mpl::equal< boost::mpl::deref< zv_at2 >::type, boost::mpl::vector_c< int, 5, 6 > >::value))
 
 BOOST_STATIC_ASSERT ((boost::mpl::equal< boost::mpl::deref< zv_at3 >::type, boost::mpl::vector_c< int, 7, 8 > >::value))
 
 BOOST_STATIC_ASSERT ((boost::is_same< zip_list_category, boost::mpl::forward_iterator_tag >::value))
 

Detailed Description

Tests functionality from Exercise 7-2.

Typedef Documentation

◆ l1

typedef boost::mpl::list_c<int, 1, 3, 5, 7> test_7_2::l1

Definition at line 153 of file chapter-7.cpp.

◆ l2

typedef boost::mpl::list_c<int, 2, 4, 6, 8> test_7_2::l2

Definition at line 154 of file chapter-7.cpp.

◆ v1

typedef boost::mpl::vector_c<int, 1, 3, 5, 7> test_7_2::v1

Definition at line 111 of file chapter-7.cpp.

◆ v2

typedef boost::mpl::vector_c<int, 2, 4, 6, 8> test_7_2::v2

Definition at line 112 of file chapter-7.cpp.

◆ zip_list

typedef boost::mpl::list<l1, l2> test_7_2::zip_list

Definition at line 155 of file chapter-7.cpp.

◆ zip_list_category

◆ zip_vec

typedef boost::mpl::vector<v1, v2> test_7_2::zip_vec

Definition at line 113 of file chapter-7.cpp.

◆ zip_vec_category

◆ zip_vec_t

Definition at line 114 of file chapter-7.cpp.

◆ zv_at2

typedef boost::mpl::at<zip_vec_t,boost::mpl::int_<2>>::type test_7_2::zv_at2

Definition at line 141 of file chapter-7.cpp.

◆ zv_at3

typedef boost::mpl::advance<zv_next,boost::mpl::int_<2>>::type test_7_2::zv_at3

Definition at line 147 of file chapter-7.cpp.

◆ zv_begin

typedef boost::mpl::begin<zip_vec_t>::type test_7_2::zv_begin

Definition at line 124 of file chapter-7.cpp.

◆ zv_begin_t

typedef boost::mpl::deref<zv_begin>::type test_7_2::zv_begin_t

Definition at line 125 of file chapter-7.cpp.

◆ zv_next

typedef boost::mpl::next<zv_begin>::type test_7_2::zv_next

Definition at line 130 of file chapter-7.cpp.

◆ zv_prior

typedef boost::mpl::prior<zv_next>::type test_7_2::zv_prior

Definition at line 135 of file chapter-7.cpp.

Function Documentation

◆ BOOST_STATIC_ASSERT() [1/8]

test_7_2::BOOST_STATIC_ASSERT ( (boost::is_same< zip_list_category, boost::mpl::forward_iterator_tag >::value)  )

◆ BOOST_STATIC_ASSERT() [2/8]

test_7_2::BOOST_STATIC_ASSERT ( (boost::is_same< zip_vec_category, boost::mpl::random_access_iterator_tag >::value)  )

◆ BOOST_STATIC_ASSERT() [3/8]

test_7_2::BOOST_STATIC_ASSERT ( (boost::is_same< zv_prior, zv_begin >::value)  )

◆ BOOST_STATIC_ASSERT() [4/8]

test_7_2::BOOST_STATIC_ASSERT ( (boost::mpl::equal< boost::mpl::deref< zv_at2 >::type, boost::mpl::vector_c< int, 5, 6 > >::value)  )

◆ BOOST_STATIC_ASSERT() [5/8]

test_7_2::BOOST_STATIC_ASSERT ( (boost::mpl::equal< boost::mpl::deref< zv_at3 >::type, boost::mpl::vector_c< int, 7, 8 > >::value)  )

◆ BOOST_STATIC_ASSERT() [6/8]

test_7_2::BOOST_STATIC_ASSERT ( (boost::mpl::equal< boost::mpl::deref< zv_next >::type, boost::mpl::vector_c< int, 3, 4 > >::value)  )

◆ BOOST_STATIC_ASSERT() [7/8]

test_7_2::BOOST_STATIC_ASSERT ( (boost::mpl::equal< boost::mpl::deref< zv_prior >::type, boost::mpl::vector_c< int, 1, 2 > >::value)  )

◆ BOOST_STATIC_ASSERT() [8/8]

test_7_2::BOOST_STATIC_ASSERT ( (boost::mpl::equal< zv_begin_t, boost::mpl::vector_c< int, 1, 2 > >::value)  )