C++ Template Metaprogramming
Solutions to the exercises throughout the book
Loading...
Searching...
No Matches
chapter-3.cpp File Reference

Test application for Chapter 3. More...

#include "exercise-3-0.hpp"
#include "exercise-3-1.hpp"
#include "exercise-3-2.hpp"
#include "exercise-3-3.hpp"
#include "exercise-3-4.hpp"
#include "exercise-3-5.hpp"
#include "exercise-3-6.hpp"
#include <boost/static_assert.hpp>
#include <boost/mpl/equal.hpp>
#include <boost/mpl/vector_c.hpp>

Go to the source code of this file.

Namespaces

namespace  test_3_0
 Tests functionality from Exercise 3-0.
 
namespace  test_3_1
 Tests functionality from Exercise 3-1.
 
namespace  test_3_2
 Tests functionality from Exercise 3-2.
 
namespace  anonymous_namespace{chapter-3.cpp}
 

Typedefs

typedef boost::mpl::vector_c< int, 1, 2, 3 > test_3_1::init_vector_t
 
typedef ex_3_1< init_vector_t >::type test_3_1::new_vector_t
 
typedef ex_3_1b< init_vector_t >::type test_3_1::new_vectorb_t
 
typedef boost::mpl::vector_c< int, 1, 2, 3 > test_3_2::init_vector_t
 
typedef ex_3_2< init_vector_t >::type test_3_2::new_vector_t
 

Functions

 test_3_1::BOOST_STATIC_ASSERT ((boost::mpl::equal< new_vectorb_t, boost::mpl::vector_c< int, 2, 3, 4 > >::type::value))
 
 test_3_2::BOOST_STATIC_ASSERT ((boost::mpl::equal< new_vector_t, boost::mpl::vector_c< int, 1, 4, 9 > >::type::value))
 
static void anonymous_namespace{chapter-3.cpp}::test_exercise_3_5 ()
 Tests for Exercise 3-5.
 
int main ()
 

Variables

unsigned const test_3_0::one = checked_binary<1>::value
 
unsigned const test_3_0::three = checked_binary<11>::value
 
unsigned const test_3_0::five = checked_binary<101>::value
 
unsigned const test_3_0::seven = checked_binary<111>::value
 
unsigned const test_3_0::nine = checked_binary<1001>::value
 
init_vector_t test_3_1::x
 
new_vector_t test_3_1::y
 
new_vectorb_t test_3_1::z
 
new_vector_t test_3_2::x
 

Detailed Description

Test application for Chapter 3.

Author
Matt Bisson

Definition in file chapter-3.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 172 of file chapter-3.cpp.