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>
40template<
typename F,
typename L>
41struct exit_impl : boost::mpl::equal_to<typename boost::mpl::distance<F,L>::type,boost::mpl::int_<0>>
51template<
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_;
69template<
template<
typename>
class H,
typename F,
typename L,
typename ...Args>
73 typedef boost::fusion::vector<Args...>
type;
81 typedef typename boost::mpl::begin<Seq>::type
first_;
84 typedef typename boost::mpl::end<Seq>::type
last_;
106template<
template<
typename>
class H,
typename L>
110 typedef typename boost::mpl::reverse<L>::type
reversed_;
137template<
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_;
154template<
template<
typename,
typename>
class H,
typename arg0,
typename F,
typename L,
typename ...Args>
158 typedef boost::fusion::vector<Args...>
type;
177template<
template<
typename,
typename>
class H,
typename arg0,
typename L>
181 typedef typename boost::mpl::reverse<L>::type
reversed_;
209template<
template<
typename,
typename>
class H,
typename arg0,
typename F,
typename L,
bool exit,
typename ...Args>
213 typedef typename boost::mpl::deref<F>::type
front_;
216 typedef typename boost::mpl::next<F>::type
next_;
226template<
template<
typename,
typename>
class H,
typename arg0,
typename F,
typename L,
typename ...Args>
230 typedef boost::fusion::vector<Args...>
type;
249template<
template<
typename,
typename>
class H,
typename arg0,
typename L>
253 typedef typename boost::mpl::reverse<L>::type
reversed_;
285 typedef boost::mpl::vector<boost::mpl::int_<id>...>
type;
290template <
unsigned T1,
unsigned int ...T>
293 typedef boost::mpl::int_<T1> type;
296template <
unsigned int T1,
unsigned int ...T>
302template <
unsigned int T1>
305 typedef boost::mpl::int_<T1> type;
308template <
unsigned int ... prp>
313 typedef typename boost::mpl::size<rangec>::type size_range;
315 typedef typename boost::mpl::accumulate<rangec,
317 boost::mpl::plus<
typename boost::mpl::placeholders::_2,
318 typename boost::mpl::placeholders::_1>
323 typedef typename boost::mpl::accumulate<prop_vector,
325 boost::mpl::plus<
typename boost::mpl::placeholders::_2,
326 typename boost::mpl::placeholders::_1>
329 typedef boost::mpl::bool_<
sizeof...(prp) == size_range::value && accum_prp::value == accum::value > type;
[v_transform metafunction]
implementation of seq_traits
boost::mpl::end< Seq >::type last_
Last element.
exit_impl< first_, last_ >::type exit_
exit condition (first == last)
boost::mpl::begin< Seq >::type first_
first element
boost::mpl::vector< boost::mpl::int_< id >... > type
construct an mpl vector from the variadic