8 #ifndef __FWTOOLS_COMBINATORY_HPP__ 9 #define __FWTOOLS_COMBINATORY_HPP__ 11 #include <boost/mpl/accumulate.hpp> 12 #include <boost/mpl/apply.hpp> 13 #include <boost/mpl/back_inserter.hpp> 14 #include <boost/mpl/copy.hpp> 15 #include <boost/mpl/empty.hpp> 16 #include <boost/mpl/eval_if.hpp> 17 #include <boost/mpl/placeholders.hpp> 18 #include <boost/mpl/push_front.hpp> 19 #include <boost/mpl/transform.hpp> 20 #include <boost/mpl/vector.hpp> 37 template<
class TYPE,
class SETOFSET>
41 typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if< boost::mpl::empty<SETOFSET>,
42 boost::mpl::vector< boost::mpl::vector<TYPE> >,
43 boost::mpl::transform< SETOFSET,
44 boost::mpl::push_front< boost::mpl::
58 typedef BOOST_DEDUCED_TYPENAME boost::mpl::vector< T >:: type type;
71 typedef BOOST_DEDUCED_TYPENAME boost::mpl::transform<Set, make_vector >::type type;
86 template<
class Set1,
class MultiSet >
89 typedef BOOST_DEDUCED_TYPENAME boost::mpl::accumulate< Set1,
94 boost::mpl::back_inserter< boost::mpl
139 template<
class Set1,
class Set2 >
142 typedef BOOST_DEDUCED_TYPENAME boost::mpl::apply1< makeSetOfSingletons, Set2>::type Set2WithSingletons;
145 Set2WithSingletons >::type type;
185 template<
class MultiSet >
188 typedef BOOST_DEDUCED_TYPENAME boost::mpl::reverse_fold< MultiSet,
189 boost::mpl::vector<>,
191 boost::mpl::_2, boost::mpl::_1 >