17 #ifndef V_TRANSFORM_HPP
18 #define V_TRANSFORM_HPP
20 #include <boost/fusion/container/vector.hpp>
21 #include <boost/mpl/int.hpp>
22 #include <boost/mpl/reverse.hpp>
23 #include <boost/mpl/vector.hpp>
24 #include <boost/mpl/range_c.hpp>
25 #include <boost/fusion/sequence/intrinsic/at_c.hpp>
26 #include <boost/fusion/include/at_c.hpp>
27 #include <boost/mpl/accumulate.hpp>
40 template<
typename F,
typename L>
41 struct exit_impl : boost::mpl::equal_to<typename boost::mpl::distance<F,L>::type,boost::mpl::int_<0>>
51 template<
template<
typename>
class H,
typename F,
typename L,
bool exit,
typename ...Args>
55 typedef typename boost::mpl::deref<F>::type
front_;
58 typedef typename boost::mpl::next<F>::type
next_;
69 template<
template<
typename>
class H,
typename F,
typename L,
typename ...Args>
73 typedef boost::fusion::vector<Args...>
type;
77 template<
typename Seq>
81 typedef typename boost::mpl::begin<Seq>::type
first_;
84 typedef typename boost::mpl::end<Seq>::type
last_;
106 template<
template<
typename>
class H,
typename L>
110 typedef typename boost::mpl::reverse<L>::type
reversed_;
113 typedef typename seq_traits_impl<reversed_>::first_
first;
116 typedef typename seq_traits_impl<reversed_>::last_
last;
137 template<
template<
typename,
typename>
class H,
typename arg0,
typename F,
typename L,
bool exit,
typename ...Args>
141 typedef typename boost::mpl::deref<F>::type
front_;
144 typedef typename boost::mpl::next<F>::type
next_;
155 template<
template<
typename,
typename>
class H,
typename arg0,
typename F,
typename L,
typename ...Args>
159 typedef boost::fusion::vector<Args...>
type;
178 template<
template<
typename,
typename>
class H,
typename arg0,
typename L>
182 typedef typename boost::mpl::reverse<L>::type
reversed_;
185 typedef typename seq_traits_impl<reversed_>::first_
first;
188 typedef typename seq_traits_impl<reversed_>::last_
last;
200 template <
int a,
int...
id>
212 typedef boost::mpl::vector<boost::mpl::int_<a>>
type;
238 typedef typename boost::mpl::vector<>::type
type;
243 template <
unsigned T1,
unsigned int ...T>
246 typedef boost::mpl::int_<T1> type;
249 template <
unsigned int T1,
unsigned int ...T>
255 template <
unsigned int T1>
258 typedef boost::mpl::int_<T1> type;
261 template <
unsigned int ... prp>
266 typedef typename boost::mpl::size<rangec>::type size_range;
268 typedef typename boost::mpl::accumulate<rangec,
270 boost::mpl::plus<
typename boost::mpl::placeholders::_2,
271 typename boost::mpl::placeholders::_1>
276 typedef typename boost::mpl::accumulate<prop_vector,
278 boost::mpl::plus<
typename boost::mpl::placeholders::_2,
279 typename boost::mpl::placeholders::_1>
282 typedef boost::mpl::bool_<
sizeof...(prp) == size_range::value && accum_prp::value == accum::value > type;
boost::mpl::vector< boost::mpl::int_< a > > type
create a boost mpl vector with the last number
boost::mpl::push_front< typename to_boost_vmpl_impl< id...>::type, boost::mpl::int_< a > >::type type
push in front the next number
implementation of to_boost_vmpl
boost::mpl::vector::type type
terminator
exit_impl< first_, last_ >::type exit_
exit condition (first == last)
boost::mpl::end< Seq >::type last_
Last element.
to_boost_vmpl_impl< id...>::type type
constrict an mpl vector from the variadic
implementation of seq_traits
boost::mpl::begin< Seq >::type first_
first element
[v_transform metafunction]