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

Test application for Chapter 6. More...

#include "exercise-6-0.hpp"
#include "exercise-6-1.hpp"
#include "exercise-6-3.hpp"
#include "exercise-6-4.hpp"
#include <boost/mpl/copy.hpp>
#include <boost/mpl/equal.hpp>
#include <boost/mpl/vector_c.hpp>
#include <boost/type_traits/is_same.hpp>
#include <stdio.h>

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{chapter-6.cpp}
 
namespace  anonymous_namespace{chapter-6.cpp}::test_6_0
 Tests functionality from Exercise 6-0.
 
namespace  anonymous_namespace{chapter-6.cpp}::test_6_3
 Tests functionality from Exercise 6-3.
 
namespace  anonymous_namespace{chapter-6.cpp}::test_6_4
 Tests functionality from Exercise 6-4.
 

Typedefs

typedef chapter5::tree< mpl_::integral_c< int, 17 >, chapter5::tree< mpl_::integral_c< int, 10 >, mpl_::integral_c< int, 2 >, mpl_::integral_c< int, 11 > >, mpl_::integral_c< int, 25 > > anonymous_namespace{chapter-6.cpp}::test_6_3::bst_expected
 Expected value (whitebox edition).
 
typedef boost::mpl::copy< boost::mpl::vector_c< int, 17, 25, 10, 2, 11 >, binary_tree_inserter< tree<> > >::type anonymous_namespace{chapter-6.cpp}::test_6_4::bst
 
typedef binary_tree_search< bst, boost::mpl::int_< 20 > > anonymous_namespace{chapter-6.cpp}::test_6_4::qq
 
typedef binary_tree_search< bst, boost::mpl::int_< 11 > >::type anonymous_namespace{chapter-6.cpp}::test_6_4::pos1
 
typedef binary_tree_search< bst, boost::mpl::int_< 20 > >::type anonymous_namespace{chapter-6.cpp}::test_6_4::pos2
 
typedef boost::mpl::end< bst >::type anonymous_namespace{chapter-6.cpp}::test_6_4::end_pos
 

Functions

 anonymous_namespace{chapter-6.cpp}::test_6_0::BOOST_STATIC_ASSERT ((boost::is_same< smallest< boost::mpl::vector< int[2], char, double & > >::type, char >::value))
 
 anonymous_namespace{chapter-6.cpp}::test_6_0::BOOST_STATIC_ASSERT ((boost::is_same< smallest< boost::mpl::vector< int, char[20], double & > >::type, int >::value))
 
 anonymous_namespace{chapter-6.cpp}::test_6_0::BOOST_STATIC_ASSERT ((boost::is_same< smallest< boost::mpl::vector<> >::type, no_type >::value))
 
 anonymous_namespace{chapter-6.cpp}::test_6_3::BOOST_STATIC_ASSERT ((boost::is_same< exercise_6_3::bst, bst_expected >::value))
 
 anonymous_namespace{chapter-6.cpp}::test_6_3::BOOST_STATIC_ASSERT ((boost::mpl::equal< exercise_5_10::inorder_view< exercise_6_3::bst >, boost::mpl::vector_c< int, 2, 10, 11, 17, 25 > >::value))
 
 anonymous_namespace{chapter-6.cpp}::test_6_4::BOOST_STATIC_ASSERT ((!boost::mpl::equal_to< boost::mpl::int_< 11 >, boost::mpl::int_< 20 > >::value))
 
 anonymous_namespace{chapter-6.cpp}::test_6_4::BOOST_STATIC_ASSERT ((!boost::is_same< pos1, end_pos >::value))
 
 anonymous_namespace{chapter-6.cpp}::test_6_4::BOOST_STATIC_ASSERT ((boost::is_same< pos2, end_pos >::value))
 
static void anonymous_namespace{chapter-6.cpp}::test_exercise_6_1 ()
 Tests for Exercise 6-1.
 
int main ()
 

Detailed Description

Test application for Chapter 6.

Author
Matt Bisson

Definition in file chapter-6.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 179 of file chapter-6.cpp.