12#include <boost/static_assert.hpp>
14#include <boost/mpl/copy.hpp>
15#include <boost/mpl/if.hpp>
16#include <boost/mpl/placeholders.hpp>
17#include <boost/mpl/vector.hpp>
18using namespace boost::mpl::placeholders;
65template <
typename T1,
typename T2>
67 : boost::mpl::if_<boost::mpl::bool_<(sizeof(T1) < sizeof(T2))>, T1, T2> { };
75struct find_smaller<no_type, T2>
87template <typename State = no_type, typename Operation = find_smaller<_, _> >
88struct replace_with_smaller
90 typedef Operation operation;
104struct smallest : boost::mpl::copy< S, replace_with_smaller<> > { };
Encapsulate solution for Exercise 6-0.
Find the type with a smaller size in bytes.
Provide a type to return if the sequence is empty (no "small" type).