14#include <boost/mpl/copy.hpp>
15#include <boost/mpl/equal.hpp>
16#include <boost/mpl/vector_c.hpp>
17#include <boost/type_traits/is_same.hpp>
82 smallest< boost::mpl::vector<
int[2],
char,
double&> >::type,
88 smallest< boost::mpl::vector<
int,
char[20],
double&> >::type,
106 mpl_::integral_c<int, 17>,
108 mpl_::integral_c<int, 10>,
109 mpl_::integral_c<int, 2>,
110 mpl_::integral_c<int, 11> >,
111 mpl_::integral_c<int, 25>
118 boost::mpl::vector_c<int, 2, 10, 11, 17, 25>
131typedef boost::mpl::copy<
132 boost::mpl::vector_c<int, 17, 25, 10, 2, 11>,
143 !boost::mpl::equal_to<
144 boost::mpl::int_<11>,
167 printf(
"Zero: %i\n", zero);
168 printf(
"One: %i\n", one);
169 printf(
"Three: %i\n", three);
170 printf(
"Five: %i\n", five);
171 printf(
"Seven: %i\n", seven);
172 printf(
"Nine: %i\n", nine);
BOOST_STATIC_ASSERT((boost::is_same< t5, expected_t5 >::value))
Solution to Exercise 5-10.
Solution to Exercise 6-0.
Solution to Exercise 6-1.
Solution to Exercise 6-3.
Solution to Exercise 6-4.
static void test_exercise_6_1()
Tests for Exercise 6-1.
binary_tree_search< bst, boost::mpl::int_< 20 > >::type pos2
binary_tree_search< bst, boost::mpl::int_< 11 > >::type pos1
boost::mpl::copy< boost::mpl::vector_c< int, 17, 25, 10, 2, 11 >, binary_tree_inserter< tree<> > >::type bst
boost::mpl::end< bst >::type end_pos
Encapsulate solution for Exercise 6-0.
Encapsulate solution for Exercise 6-1.
Encapsulate solution for Exercise 6-3.
Encapsulate solution for Exercise 6-4.
A basic type to represent a binary tree.
Compels iterators to traverse the tree "in order".
Provide a type to return if the sequence is empty (no "small" type).
This is the metafunction that returns the smallest type in the sequence.
Compile-time binary to decimal number translation.
Basically indistinguishable from from any other inserter since we have a generic insert metafunction.
Perform a search on a binary tree structure.