August 2017
Intermediate to advanced
438 pages
14h 19m
English
You may use Boost.MPL functions for the Boost.Fusion containers. You just need to include #include <boost/fusion/include/mpl.hpp>:
#include <boost/fusion/include/mpl.hpp>#include <boost/mpl/transform.hpp>#include <boost/type_traits/remove_const.hpp>template <class Sequence>struct make_nonconst: boost::mpl::transform< Sequence, boost::remove_const<boost::mpl::_1>> {};typedef boost::fusion::vector< const int, const boost::blank, boost::blank> type1;typedef make_nonconst<type1>::type nc_type;BOOST_STATIC_ASSERT((boost::is_same< boost::fusion::result_of::value_at_c<nc_type, 0>::type, int>::value));BOOST_STATIC_ASSERT((boost::is_same< boost::fusion::result_of::value_at_c<nc_type, 1>::type, boost::blank>::value));BOOST_STATIC_ASSERT((boost::is_same< ...Read now
Unlock full access