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

Encapsulate solution for Exercise 3-3. More...

Typedefs

typedef twice< boost::add_pointer< _1 >, int >::type double_pointer_int
 Used twice to add two pointers.
 
typedef twice< boost::add_pointer< _1 >, double_pointer_int >::type four_pointer_int
 Used twice twice to add four pointers.
 

Functions

 BOOST_STATIC_ASSERT ((boost::mpl::equal< double_pointer_int, int ** >::type::value))
 
 BOOST_STATIC_ASSERT ((boost::mpl::equal< four_pointer_int, int **** >::type::value))
 

Detailed Description

Encapsulate solution for Exercise 3-3.

Typedef Documentation

◆ double_pointer_int

typedef twice<boost::add_pointer<_1>,int>::type exercise_3_3::double_pointer_int

Used twice to add two pointers.

Definition at line 39 of file exercise-3-3.hpp.

◆ four_pointer_int

typedef twice<boost::add_pointer<_1>,double_pointer_int>::type exercise_3_3::four_pointer_int

Used twice twice to add four pointers.

Definition at line 45 of file exercise-3-3.hpp.

Function Documentation

◆ BOOST_STATIC_ASSERT() [1/2]

exercise_3_3::BOOST_STATIC_ASSERT ( (boost::mpl::equal< double_pointer_int, int ** >::type::value)  )

◆ BOOST_STATIC_ASSERT() [2/2]

exercise_3_3::BOOST_STATIC_ASSERT ( (boost::mpl::equal< four_pointer_int, int **** >::type::value)  )