August 2017
Intermediate to advanced
438 pages
14h 19m
English
This recipe is similar to the previous one, but it also uses conditional compile-time statements. Get ready, it won't be easy!
// We'll need this at step 3. #include <boost/mpl/size.hpp> #include <boost/type_traits/is_same.hpp> #include <boost/static_assert.hpp> // We'll need this at step 4. #include <boost/mpl/if.hpp> #include <boost/type_traits/make_unsigned.hpp> #include <boost/type_traits/add_const.hpp> // We'll need this at step 5. #include <boost/mpl/transform.hpp>
template <class Types, class Modifiers>
struct do_modifications {
Read now
Unlock full access