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

Tests functionality from Exercise 4-3. More...

Typedefs

typedef next_if< mpl::int_< 1 >, mpl::greater< mpl::int_< 0 >, _1 > > shouldBe1
 
typedef next_if< mpl::int_< 1 >, mpl::greater< mpl::int_< 3 >, _1 > > shouldBe2
 
typedef formula< mpl::int_< 2 >, mpl::int_< 2 > > shouldBe6
 
typedef formula< mpl::int_< 3 >, mpl::int_< 4 > > shouldBe3
 
typedef formula< mpl::int_< 9 >, mpl::int_< 2 > > shouldBe7
 

Functions

 BOOST_STATIC_ASSERT ((shouldBe1::value==1))
 
 BOOST_STATIC_ASSERT ((shouldBe2::value==2))
 
 BOOST_STATIC_ASSERT ((shouldBe6::value==6))
 
 BOOST_STATIC_ASSERT ((shouldBe3::value==3))
 
 BOOST_STATIC_ASSERT ((shouldBe7::value==7))
 

Detailed Description

Tests functionality from Exercise 4-3.

Typedef Documentation

◆ shouldBe1

typedef next_if< mpl::int_<1>, mpl::greater<mpl::int_<0>, _1> > test_4_3::shouldBe1

Definition at line 110 of file chapter-4.cpp.

◆ shouldBe2

typedef next_if< mpl::int_<1>, mpl::greater<mpl::int_<3>, _1> > test_4_3::shouldBe2

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

◆ shouldBe3

typedef formula< mpl::int_<3>, mpl::int_<4> > test_4_3::shouldBe3

Definition at line 118 of file chapter-4.cpp.

◆ shouldBe6

typedef formula< mpl::int_<2>, mpl::int_<2> > test_4_3::shouldBe6

Definition at line 117 of file chapter-4.cpp.

◆ shouldBe7

typedef formula< mpl::int_<9>, mpl::int_<2> > test_4_3::shouldBe7

Definition at line 119 of file chapter-4.cpp.

Function Documentation

◆ BOOST_STATIC_ASSERT() [1/5]

test_4_3::BOOST_STATIC_ASSERT ( (shouldBe1::value==1)  )

◆ BOOST_STATIC_ASSERT() [2/5]

test_4_3::BOOST_STATIC_ASSERT ( (shouldBe2::value==2)  )

◆ BOOST_STATIC_ASSERT() [3/5]

test_4_3::BOOST_STATIC_ASSERT ( (shouldBe3::value==3)  )

◆ BOOST_STATIC_ASSERT() [4/5]

test_4_3::BOOST_STATIC_ASSERT ( (shouldBe6::value==6)  )

◆ BOOST_STATIC_ASSERT() [5/5]

test_4_3::BOOST_STATIC_ASSERT ( (shouldBe7::value==7)  )