Removed file/folder

[SVN r40230]
This commit is contained in:
Joel de Guzman
2007-10-20 23:49:46 +00:00
parent 66cc9bbc28
commit 13b01b0bfe
474 changed files with 0 additions and 25526 deletions

View File

@ -1,14 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ALGORITHM_10022005_0549)
#define FUSION_ALGORITHM_10022005_0549
#include <boost/fusion/algorithm/iteration.hpp>
#include <boost/fusion/algorithm/query.hpp>
#include <boost/fusion/algorithm/transformation.hpp>
#endif

View File

@ -1,14 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ALGORITHM_ITERATION_10022005_0549)
#define FUSION_ALGORITHM_ITERATION_10022005_0549
#include <boost/fusion/algorithm/iteration/accumulate.hpp>
#include <boost/fusion/algorithm/iteration/fold.hpp>
#include <boost/fusion/algorithm/iteration/for_each.hpp>
#endif

View File

@ -1,40 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ACCUMULATE_09172005_1032)
#define FUSION_ACCUMULATE_09172005_1032
#include <boost/fusion/algorithm/iteration/fold.hpp>
namespace boost { namespace fusion
{
struct void_;
namespace result_of
{
template <typename Sequence, typename State, typename F>
struct accumulate
: result_of::fold<Sequence, State, F>
{};
}
template <typename Sequence, typename State, typename F>
inline typename result_of::accumulate<Sequence, State, F>::type
accumulate(Sequence& seq, State const& state, F f)
{
return fusion::fold(seq, state, f);
}
template <typename Sequence, typename State, typename F>
inline typename result_of::accumulate<Sequence const, State, F>::type
accumulate(Sequence const& seq, State const& state, F f)
{
return fusion::fold(seq, state, f);
}
}}
#endif

View File

@ -1,271 +0,0 @@
#if !defined(BOOST_FUSION_FOLD_HPP_20070528_1253)
#define BOOST_FUSION_FOLD_HPP_20070528_1253
#include <boost/mpl/bool.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/value_of.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/distance.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
namespace boost { namespace fusion {
namespace result_of
{
template <typename Sequence, typename State, typename F>
struct fold;
}
namespace detail
{
template <typename F>
struct apply_fold_result
{
template <typename Value, typename State>
struct apply
: boost::result_of<F(Value,State)>
{};
};
template <typename Iterator, typename State, typename F>
struct fold_apply
{
typedef typename result_of::deref<Iterator>::type dereferenced;
typedef typename add_reference<typename add_const<State>::type>::type lvalue_state;
typedef typename boost::result_of<F(dereferenced, lvalue_state)>::type type;
};
template <typename First, typename Last, typename State, typename F>
struct static_fold;
template <typename First, typename Last, typename State, typename F>
struct next_result_of_fold
{
typedef typename
static_fold<
typename result_of::next<First>::type
, Last
, typename fold_apply<First, State, F>::type
, F
>::type
type;
};
template <typename First, typename Last, typename State, typename F>
struct static_fold
{
typedef typename
mpl::if_<
result_of::equal_to<First, Last>
, mpl::identity<State>
, next_result_of_fold<First, Last, State, F>
>::type
result;
typedef typename result::type type;
};
template<typename I0, typename State, typename F, int N>
struct result_of_unrolled_fold;
template<int N>
struct unrolled_fold
{
template<typename I0, typename State, typename F>
static typename result_of_unrolled_fold<I0, State, F, N>::type
call(I0 const& i0, State const& state, F f)
{
typedef typename result_of::next<I0>::type I1;
I1 i1 = fusion::next(i0);
typedef typename result_of::next<I1>::type I2;
I2 i2 = fusion::next(i1);
typedef typename result_of::next<I2>::type I3;
I3 i3 = fusion::next(i2);
typedef typename result_of::next<I3>::type I4;
I4 i4 = fusion::next(i3);
return unrolled_fold<N-4>::call(i4, f(*i3, f(*i2, f(*i1, f(*i0, state)))), f);
}
};
template<>
struct unrolled_fold<3>
{
template<typename I0, typename State, typename F>
static typename result_of_unrolled_fold<I0, State, F, 3>::type
call(I0 const& i0, State const& state, F f)
{
typedef typename result_of::next<I0>::type I1;
I1 i1 = fusion::next(i0);
typedef typename result_of::next<I1>::type I2;
I2 i2 = fusion::next(i1);
return f(*i2, f(*i1, f(*i0, state)));
}
};
template<>
struct unrolled_fold<2>
{
template<typename I0, typename State, typename F>
static typename result_of_unrolled_fold<I0, State, F, 2>::type
call(I0 const& i0, State const& state, F f)
{
typedef typename result_of::next<I0>::type I1;
I1 i1 = fusion::next(i0);
return f(*i1, f(*i0, state));
}
};
template<>
struct unrolled_fold<1>
{
template<typename I0, typename State, typename F>
static typename result_of_unrolled_fold<I0, State, F, 1>::type
call(I0 const& i0, State const& state, F f)
{
return f(*i0, state);
}
};
template<>
struct unrolled_fold<0>
{
template<typename I0, typename State, typename F>
static State call(I0 const&, State const& state, F)
{
return state;
}
};
// terminal case
template <typename First, typename Last, typename State, typename F>
inline State const&
linear_fold(First const&, Last const&, State const& state, F, mpl::true_)
{
return state;
}
// non-terminal case
template <typename First, typename Last, typename State, typename F>
inline typename static_fold<First, Last, State, F>::type
linear_fold(
First const& first
, Last const& last
, State const& state
, F f
, mpl::false_)
{
return detail::linear_fold(
fusion::next(first)
, last
, f(*first, state)
, f
, result_of::equal_to<typename result_of::next<First>::type, Last>()
);
}
template<typename I0, typename State, typename F, int N>
struct result_of_unrolled_fold
{
typedef typename result_of::next<I0>::type I1;
typedef typename result_of::next<I1>::type I2;
typedef typename result_of::next<I2>::type I3;
typedef typename result_of::next<I3>::type I4;
typedef typename fold_apply<I0, State, F>::type Rest1;
typedef typename fold_apply<I1, Rest1, F>::type Rest2;
typedef typename fold_apply<I2, Rest2, F>::type Rest3;
typedef typename fold_apply<I3, Rest3, F>::type Rest4;
typedef typename result_of_unrolled_fold<I4, Rest4, F, N-4>::type type;
};
template<typename I0, typename State, typename F>
struct result_of_unrolled_fold<I0, State, F, 3>
{
typedef typename result_of::next<I0>::type I1;
typedef typename result_of::next<I1>::type I2;
typedef typename fold_apply<I0, State, F>::type Rest;
typedef typename fold_apply<I1, Rest, F>::type Rest2;
typedef typename fold_apply<I2, Rest2, F>::type type;
};
template<typename I0, typename State, typename F>
struct result_of_unrolled_fold<I0, State, F, 2>
{
typedef typename result_of::next<I0>::type I1;
typedef typename fold_apply<I0, State, F>::type Rest;
typedef typename fold_apply<I1, Rest, F>::type type;
};
template<typename I0, typename State, typename F>
struct result_of_unrolled_fold<I0, State, F, 1>
{
typedef typename fold_apply<I0, State, F>::type type;
};
template<typename I0, typename State, typename F>
struct result_of_unrolled_fold<I0, State, F, 0>
{
typedef State type;
};
template<typename Sequence, typename State, typename F, bool>
struct choose_fold;
template<typename Sequence, typename State, typename F>
struct choose_fold<Sequence, State, F, true>
{
typedef typename result_of::begin<Sequence>::type begin;
typedef typename result_of::end<Sequence>::type end;
typedef typename result_of_unrolled_fold<
begin, State, F, result_of::distance<begin, end>::type::value>::type type;
};
template<typename Sequence, typename State, typename F>
struct choose_fold<Sequence, State, F, false>
{
typedef typename
detail::static_fold<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type
, State
, F
>::type
type;
};
template<typename Sequence, typename State, typename F, typename Tag>
typename result_of::fold<Sequence, State, F>::type
fold(Sequence& seq, State const& state, F f, Tag)
{
return linear_fold(
fusion::begin(seq)
, fusion::end(seq)
, state
, f
, result_of::equal_to<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type>()
);
}
template<typename Sequence, typename State, typename F>
typename result_of::fold<Sequence, State, F>::type
fold(Sequence& seq, State const& state, F f, random_access_traversal_tag)
{
typedef typename result_of::begin<Sequence>::type begin;
typedef typename result_of::end<Sequence>::type end;
return unrolled_fold<result_of::distance<begin, end>::type::value>::call(
fusion::begin(seq)
, state
, f);
}
}}}
#endif

View File

@ -1,130 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_FOR_EACH_05052005_1028)
#define FUSION_FOR_EACH_05052005_1028
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/distance.hpp>
#include <boost/mpl/bool.hpp>
namespace boost { namespace fusion {
namespace detail
{
template <typename First, typename Last, typename F>
inline void
for_each_linear(First const&, Last const&, F const&, mpl::true_)
{
}
template <typename First, typename Last, typename F>
inline void
for_each_linear(First const& first, Last const& last, F const& f, mpl::false_)
{
f(*first);
detail::for_each_linear(fusion::next(first), last, f,
result_of::equal_to<typename result_of::next<First>::type, Last>());
}
template <typename Sequence, typename F, typename Tag>
inline void
for_each(Sequence& seq, F const& f, Tag)
{
detail::for_each_linear(
fusion::begin(seq)
, fusion::end(seq)
, f
, result_of::equal_to<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type>());
}
template<int N>
struct for_each_unrolled
{
template<typename I0, typename F>
static void call(I0 const& i0, F const& f)
{
f(*i0);
typedef typename result_of::next<I0>::type I1;
I1 i1(fusion::next(i0));
f(*i1);
typedef typename result_of::next<I1>::type I2;
I2 i2(fusion::next(i1));
f(*i2);
typedef typename result_of::next<I2>::type I3;
I3 i3(fusion::next(i2));
f(*i3);
for_each_unrolled<N-4>::call(fusion::next(i3), f);
}
};
template<>
struct for_each_unrolled<3>
{
template<typename I0, typename F>
static void call(I0 const& i0, F const& f)
{
f(*i0);
typedef typename result_of::next<I0>::type I1;
I1 i1(fusion::next(i0));
f(*i1);
typedef typename result_of::next<I1>::type I2;
I2 i2(fusion::next(i1));
f(*i2);
}
};
template<>
struct for_each_unrolled<2>
{
template<typename I0, typename F>
static void call(I0 const& i0, F const& f)
{
f(*i0);
typedef typename result_of::next<I0>::type I1;
I1 i1(fusion::next(i0));
f(*i1);
}
};
template<>
struct for_each_unrolled<1>
{
template<typename I0, typename F>
static void call(I0 const& i0, F const& f)
{
f(*i0);
}
};
template<>
struct for_each_unrolled<0>
{
template<typename It, typename F>
static void call(It const&, F const&)
{
}
};
template <typename Sequence, typename F>
inline void
for_each(Sequence& seq, F const& f, random_access_traversal_tag)
{
typedef typename result_of::begin<Sequence>::type begin;
typedef typename result_of::end<Sequence>::type end;
for_each_unrolled<result_of::distance<begin, end>::type::value>::call(fusion::begin(seq), f);
}
}}}
#endif

View File

@ -1,91 +0,0 @@
/*=============================================================================
Copyright (c) 2006 Eric Niebler
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_FOR_EACH_S_05022006_1027)
#define FUSION_FOR_EACH_S_05022006_1027
#include <boost/mpl/assert.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/fusion/algorithm/iteration/for_each.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp>
#include <boost/fusion/support/ext_/is_segmented.hpp>
// fwd declarations
namespace boost { namespace fusion
{
template <typename Sequence, typename F>
void
for_each_s(Sequence& seq, F const& f);
template <typename Sequence, typename F>
void
for_each_s(Sequence const& seq, F const& f);
}}
namespace boost { namespace fusion { namespace detail
{
template<typename F>
struct for_each_s_bind
{
explicit for_each_s_bind(F const &f)
: f_(f)
{}
template<typename Sequence>
void operator ()(Sequence &seq) const
{
fusion::for_each_s(seq, this->f_);
}
template<typename Sequence>
void operator ()(Sequence const &seq) const
{
fusion::for_each_s(seq, this->f_);
}
private:
F const &f_;
};
template<typename Sequence, typename F>
void for_each_s(Sequence &seq, F const &f, mpl::true_)
{
fusion::for_each_s(fusion::segments(seq), for_each_s_bind<F>(f));
}
template<typename Sequence, typename F>
void for_each_s(Sequence &seq, F const &f, mpl::false_)
{
fusion::for_each(seq, f);
}
}}}
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename F>
struct for_each_s
{
typedef void type;
};
}
template <typename Sequence, typename F>
inline void
for_each_s(Sequence& seq, F const& f)
{
detail::for_each_s(seq, f, traits::is_segmented<Sequence>());
}
template <typename Sequence, typename F>
inline void
for_each_s(Sequence const& seq, F const& f)
{
detail::for_each_s(seq, f, traits::is_segmented<Sequence>());
}
}}
#endif

View File

@ -1,48 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_FOLD_05052005_1214)
#define BOOST_FUSION_FOLD_05052005_1214
#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/type_traits/is_base_of.hpp>
#include <boost/static_assert.hpp>
namespace boost { namespace fusion {
struct random_access_traversal_tag;
namespace result_of
{
template <typename Sequence, typename State, typename F>
struct fold
: fusion::detail::choose_fold<
Sequence, State, F
, is_base_of<random_access_traversal_tag, typename traits::category_of<Sequence>::type>::value>
{};
}
template <typename Sequence, typename State, typename F>
inline typename result_of::fold<Sequence, State, F>::type
fold(Sequence& seq, State const& state, F f)
{
return detail::fold(seq, state, f, typename traits::category_of<Sequence>::type());
}
template <typename Sequence, typename State, typename F>
inline typename result_of::fold<Sequence const, State, F>::type
fold(Sequence const& seq, State const& state, F f)
{
return detail::fold(seq, state, f, typename traits::category_of<Sequence>::type());
}
}}
#endif

View File

@ -1,43 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_FOR_EACH_20070527_0943)
#define BOOST_FUSION_FOR_EACH_20070527_0943
#include <boost/fusion/algorithm/iteration/detail/for_each.hpp>
#include <boost/fusion/support/category_of.hpp>
namespace boost { namespace fusion {
namespace result_of
{
template <typename Sequence, typename F>
struct for_each
{
typedef void type;
};
}
struct random_access_traversal_tag;
template <typename Sequence, typename F>
inline void
for_each(Sequence& seq, F const& f)
{
detail::for_each(seq, f, typename traits::category_of<Sequence>::type());
}
template <typename Sequence, typename F>
inline void
for_each(Sequence const& seq, F const& f)
{
detail::for_each(seq, f, typename traits::category_of<Sequence>::type());
}
}}
#endif

View File

@ -1,18 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ALGORITHM_QUERY_10022005_0549)
#define FUSION_ALGORITHM_QUERY_10022005_0549
#include <boost/fusion/algorithm/query/all.hpp>
#include <boost/fusion/algorithm/query/any.hpp>
#include <boost/fusion/algorithm/query/count.hpp>
#include <boost/fusion/algorithm/query/count_if.hpp>
#include <boost/fusion/algorithm/query/find.hpp>
#include <boost/fusion/algorithm/query/find_if.hpp>
#include <boost/fusion/algorithm/query/none.hpp>
#endif

View File

@ -1,34 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_ALL_05052005_1238)
#define BOOST_FUSION_ALL_05052005_1238
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/algorithm/query/detail/all.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename F>
struct all
{
typedef bool type;
};
}
template <typename Sequence, typename F>
inline bool
all(Sequence const& seq, F f)
{
return detail::all(seq, f, typename traits::category_of<Sequence>::type());
}
}}
#endif

View File

@ -1,35 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005 Eric Niebler
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ANY_05052005_1230)
#define FUSION_ANY_05052005_1230
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/algorithm/query/detail/any.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename F>
struct any
{
typedef bool type;
};
}
template <typename Sequence, typename F>
inline bool
any(Sequence const& seq, F f)
{
return detail::any(seq, f, typename traits::category_of<Sequence>::type());
}
}}
#endif

View File

@ -1,35 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2007
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_COUNT_09162005_0150)
#define BOOST_FUSION_COUNT_09162005_0150
#include <boost/fusion/algorithm/query/count_if.hpp>
#include <boost/fusion/algorithm/query/detail/count.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename F>
struct count
{
typedef int type;
};
}
template <typename Sequence, typename T>
inline int
count(Sequence const& seq, T const& x)
{
detail::count_compare<T> f(x);
return fusion::count_if(seq, f);
}
}}
#endif

View File

@ -1,35 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_COUNT_IF_09162005_0137)
#define BOOST_FUSION_COUNT_IF_09162005_0137
#include <boost/fusion/algorithm/query/detail/count_if.hpp>
#include <boost/fusion/support/category_of.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename F>
struct count_if
{
typedef int type;
};
}
template <typename Sequence, typename F>
inline int
count_if(Sequence const& seq, F f)
{
return detail::count_if(
seq, f, typename traits::category_of<Sequence>::type());
}
}}
#endif

View File

@ -1,127 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ALL_05052005_1237)
#define FUSION_ALL_05052005_1237
#include <boost/mpl/bool.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/advance.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/distance.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename First, typename Last, typename F>
inline bool
linear_all(First const&, Last const&, F const&, mpl::true_)
{
return true;
}
template <typename First, typename Last, typename F>
inline bool
linear_all(First const& first, Last const& last, F& f, mpl::false_)
{
typename result_of::deref<First>::type x = *first;
return f(x) &&
detail::linear_all(
fusion::next(first)
, last
, f
, result_of::equal_to<typename result_of::next<First>::type, Last>());
}
template <typename Sequence, typename F, typename Tag>
inline bool
all(Sequence const& seq, F f, Tag)
{
return detail::linear_all(
fusion::begin(seq)
, fusion::end(seq)
, f
, result_of::equal_to<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type>());
}
template<int N>
struct unrolled_all
{
template <typename It, typename F>
static bool call(It const& it, F f)
{
return
f(*it) &&
f(*fusion::advance_c<1>(it))&&
f(*fusion::advance_c<2>(it)) &&
f(*fusion::advance_c<3>(it)) &&
detail::unrolled_all<N-4>::call(fusion::advance_c<4>(it), f);
}
};
template<>
struct unrolled_all<3>
{
template <typename It, typename F>
static bool call(It const& it, F f)
{
return
f(*it) &&
f(*fusion::advance_c<1>(it)) &&
f(*fusion::advance_c<2>(it));
}
};
template<>
struct unrolled_all<2>
{
template <typename It, typename F>
static bool call(It const& it, F f)
{
return
f(*it) &&
f(*fusion::advance_c<1>(it));
}
};
template<>
struct unrolled_all<1>
{
template <typename It, typename F>
static bool call(It const& it, F f)
{
return f(*it);
}
};
template<>
struct unrolled_all<0>
{
template <typename It, typename F>
static bool call(It const& it, F f)
{
return false;
}
};
template <typename Sequence, typename F>
inline bool
all(Sequence const& seq, F f, random_access_traversal_tag)
{
typedef typename result_of::begin<Sequence>::type begin;
typedef typename result_of::end<Sequence>::type end;
return detail::unrolled_all<result_of::distance<begin, end>::type::value>::call(
fusion::begin(seq), f);
}
}}}
#endif

View File

@ -1,130 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005 Eric Niebler
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ANY_05052005_1229)
#define FUSION_ANY_05052005_1229
#include <boost/mpl/bool.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/advance.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/distance.hpp>
namespace boost { namespace fusion {
struct random_access_traversal_tag;
namespace detail
{
template <typename First, typename Last, typename F>
inline bool
linear_any(First const&, Last const&, F const&, mpl::true_)
{
return false;
}
template <typename First, typename Last, typename F>
inline bool
linear_any(First const& first, Last const& last, F& f, mpl::false_)
{
typename result_of::deref<First>::type x = *first;
return f(x) ||
detail::linear_any(
fusion::next(first)
, last
, f
, result_of::equal_to<typename result_of::next<First>::type, Last>());
}
template <typename Sequence, typename F, typename Tag>
inline bool
any(Sequence const& seq, F f, Tag)
{
return detail::linear_any(
fusion::begin(seq)
, fusion::end(seq)
, f
, result_of::equal_to<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type>());
}
template<int N>
struct unrolled_any
{
template <typename It, typename F>
static bool call(It const& it, F f)
{
return
f(*it) ||
f(*fusion::advance_c<1>(it))||
f(*fusion::advance_c<2>(it)) ||
f(*fusion::advance_c<3>(it)) ||
detail::unrolled_any<N-4>::call(fusion::advance_c<4>(it), f);
}
};
template<>
struct unrolled_any<3>
{
template <typename It, typename F>
static bool call(It const& it, F f)
{
return
f(*it) ||
f(*fusion::advance_c<1>(it)) ||
f(*fusion::advance_c<2>(it));
}
};
template<>
struct unrolled_any<2>
{
template <typename It, typename F>
static bool call(It const& it, F f)
{
return
f(*it) ||
f(*fusion::advance_c<1>(it));
}
};
template<>
struct unrolled_any<1>
{
template <typename It, typename F>
static bool call(It const& it, F f)
{
return f(*it);
}
};
template<>
struct unrolled_any<0>
{
template <typename It, typename F>
static bool call(It const& it, F f)
{
return false;
}
};
template <typename Sequence, typename F>
inline bool
any(Sequence const& seq, F f, random_access_traversal_tag)
{
typedef typename result_of::begin<Sequence>::type begin;
typedef typename result_of::end<Sequence>::type end;
return detail::unrolled_any<result_of::distance<begin, end>::type::value>::call(
fusion::begin(seq), f);
}
}}}
#endif

View File

@ -1,35 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ASSOC_FIND_09242005_1133)
#define FUSION_ASSOC_FIND_09242005_1133
#include <boost/mpl/identity.hpp>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_const.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename Sequence, typename Key>
struct assoc_find
{
typedef typename
mpl::if_<
is_const<Sequence>
, typename Sequence::template meta_find_impl_const<Key>::type
, typename Sequence::template meta_find_impl<Key>::type
>::type
type;
static type
call(Sequence& s)
{
return s.find_impl(mpl::identity<Key>());
}
};
}}}
#endif

View File

@ -1,68 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_COUNT_09162005_0158)
#define FUSION_COUNT_09162005_0158
#include <boost/mpl/or.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/fusion/support/detail/access.hpp>
namespace boost { namespace fusion { namespace detail
{
template <bool is_convertible>
struct compare_convertible;
// T1 is convertible to T2 or vice versa
template <>
struct compare_convertible<true>
{
template <typename T1, typename T2>
static bool
call(T1 const& x, T2 const& y)
{
return x == y;
}
};
// T1 is NOT convertible to T2 NOR vice versa
template <>
struct compare_convertible<false>
{
template <typename T1, typename T2>
static bool
call(T1 const&, T2 const&)
{
return false;
}
};
template <typename T1>
struct count_compare
{
typedef typename detail::call_param<T1>::type param;
count_compare(param x)
: x(x) {}
template <typename T2>
bool
operator()(T2 const& y)
{
return
compare_convertible<
mpl::or_<
is_convertible<T1, T2>
, is_convertible<T2, T1>
>::value
>::call(x, y);
}
param x;
};
}}}
#endif

View File

@ -1,170 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_COUNT_IF_09162005_0141)
#define BOOST_FUSION_COUNT_IF_09162005_0141
#include <boost/mpl/bool.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/distance.hpp>
#include <boost/fusion/iterator/advance.hpp>
namespace boost { namespace fusion {
struct random_access_traversal_tag;
namespace detail
{
template <typename First, typename Last, typename F>
inline int
linear_count_if(First const&, Last const&, F const&, mpl::true_)
{
return 0;
}
template <typename First, typename Last, typename F>
inline int
linear_count_if(First const& first, Last const& last, F& f, mpl::false_)
{
int n =
detail::linear_count_if(
fusion::next(first)
, last
, f
, result_of::equal_to<typename result_of::next<First>::type, Last>());
if (f(*first))
++n;
return n;
}
template <typename Sequence, typename F, typename Tag>
inline int
count_if(Sequence const& seq, F f, Tag)
{
return detail::linear_count_if(
fusion::begin(seq)
, fusion::end(seq)
, f
, result_of::equal_to<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type>());
}
template<int n>
struct unrolled_count_if
{
template<typename I0, typename F>
static int call(I0 const& i0, F f)
{
int ct = unrolled_count_if<n-4>::
call(fusion::advance_c<4>(i0), f);
if(f(*i0))
++ct;
typedef typename result_of::next<I0>::type I1;
I1 i1(fusion::next(i0));
if(f(*i1))
++ct;
typedef typename result_of::next<I1>::type I2;
I2 i2(fusion::next(i1));
if(f(*i2))
++ct;
typedef typename result_of::next<I2>::type I3;
I3 i3(fusion::next(i2));
if(f(*i3))
++ct;
return ct;
}
};
template<>
struct unrolled_count_if<3>
{
template<typename I0, typename F>
static int call(I0 const& i0, F f)
{
int ct = 0;
if(f(*i0))
++ct;
typedef typename result_of::next<I0>::type I1;
I1 i1(fusion::next(i0));
if(f(*i1))
++ct;
typedef typename result_of::next<I1>::type I2;
I2 i2(fusion::next(i1));
if(f(*i2))
++ct;
return ct;
}
};
template<>
struct unrolled_count_if<2>
{
template<typename I0, typename F>
static int call(I0 const& i0, F f)
{
int ct = 0;
if(f(*i0))
++ct;
typedef typename result_of::next<I0>::type I1;
I1 i1(fusion::next(i0));
if(f(*i1))
++ct;
return ct;
}
};
template<>
struct unrolled_count_if<1>
{
template<typename I0, typename F>
static int call(I0 const& i0, F f)
{
int ct = 0;
if(f(*i0))
++ct;
return ct;
}
};
template<>
struct unrolled_count_if<0>
{
template<typename I0, typename F>
static int call(I0 const&, F)
{
return 0;
}
};
template <typename Sequence, typename F>
inline int
count_if(Sequence const& seq, F f, random_access_traversal_tag)
{
typedef typename result_of::begin<Sequence>::type begin;
typedef typename result_of::end<Sequence>::type end;
return detail::unrolled_count_if<result_of::distance<begin, end>::type::value>::
call(fusion::begin(seq), f);
}
}}}
#endif

View File

@ -1,252 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_FIND_IF_05052005_1107)
#define FUSION_FIND_IF_05052005_1107
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/lambda.hpp>
#include <boost/mpl/apply.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/fusion/iterator/value_of.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/iterator/advance.hpp>
#include <boost/fusion/iterator/distance.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
namespace boost { namespace fusion {
struct random_access_traversal_tag;
namespace detail
{
template <typename Iterator, typename Pred>
struct apply_filter
{
typedef typename mpl::apply1<
Pred, typename result_of::value_of<Iterator>::type>::type type;
BOOST_STATIC_CONSTANT(int, value = type::value);
};
template <typename First, typename Last, typename Pred>
struct main_find_if;
template <typename First, typename Last, typename Pred>
struct recursive_find_if
{
typedef typename
main_find_if<
typename result_of::next<First>::type, Last, Pred
>::type
type;
};
template <typename First, typename Last, typename Pred>
struct main_find_if
{
typedef mpl::or_<
result_of::equal_to<First, Last>
, apply_filter<First, Pred> >
filter;
typedef typename
mpl::eval_if<
filter
, mpl::identity<First>
, recursive_find_if<First, Last, Pred>
>::type
type;
};
template<
typename First, typename Last,
typename Pred, bool>
struct choose_find_if;
template<typename First, typename Last, typename Pred>
struct choose_find_if<First, Last, Pred, false>
: main_find_if<First, Last, Pred>
{};
template<typename Iter, typename Pred, int n, int unrolling>
struct unroll_again;
template <typename Iter, typename Pred, int offset>
struct apply_offset_filter
{
typedef typename result_of::advance_c<Iter, offset>::type Shifted;
typedef typename
mpl::apply1<
Pred
, typename result_of::value_of<Shifted>::type
>::type
type;
BOOST_STATIC_CONSTANT(int, value = type::value);
};
template<typename Iter, typename Pred, int n>
struct unrolled_find_if
{
typedef typename mpl::eval_if<
apply_filter<Iter, Pred>,
mpl::identity<Iter>,
mpl::eval_if<
apply_offset_filter<Iter, Pred, 1>,
result_of::advance_c<Iter, 1>,
mpl::eval_if<
apply_offset_filter<Iter, Pred, 2>,
result_of::advance_c<Iter, 2>,
mpl::eval_if<
apply_offset_filter<Iter, Pred, 3>,
result_of::advance_c<Iter, 3>,
unroll_again<
Iter,
Pred,
n,
4> > > > >::type type;
};
template<typename Iter, typename Pred>
struct unrolled_find_if<Iter, Pred, 3>
{
typedef typename mpl::eval_if<
apply_filter<Iter, Pred>,
mpl::identity<Iter>,
mpl::eval_if<
apply_offset_filter<Iter, Pred, 1>,
result_of::advance_c<Iter, 1>,
mpl::eval_if<
apply_offset_filter<Iter, Pred, 2>,
result_of::advance_c<Iter, 2>,
result_of::advance_c<Iter, 3> > > >::type type;
};
template<typename Iter, typename Pred>
struct unrolled_find_if<Iter, Pred, 2>
{
typedef typename mpl::eval_if<
apply_filter<Iter, Pred>,
mpl::identity<Iter>,
mpl::eval_if<
apply_offset_filter<Iter, Pred, 1>,
result_of::advance_c<Iter, 1>,
result_of::advance_c<Iter, 2> > >::type type;
};
template<typename Iter, typename Pred>
struct unrolled_find_if<Iter, Pred, 1>
{
typedef typename mpl::eval_if<
apply_filter<Iter, Pred>,
mpl::identity<Iter>,
result_of::advance_c<Iter, 1> >::type type;
};
template<typename Iter, typename Pred, int n, int unrolling>
struct unroll_again
{
typedef typename unrolled_find_if<
typename result_of::advance_c<Iter, unrolling>::type,
Pred,
n-unrolling>::type type;
};
template<typename Iter, typename Pred>
struct unrolled_find_if<Iter, Pred, 0>
{
typedef Iter type;
};
template<typename First, typename Last, typename Pred>
struct choose_find_if<First, Last, Pred, true>
{
typedef typename result_of::distance<First, Last>::type N;
typedef typename unrolled_find_if<First, Pred, N::value>::type type;
};
template <typename First, typename Last, typename Pred>
struct static_find_if
{
typedef typename
choose_find_if<
First
, Last
, typename mpl::lambda<Pred>::type
, is_base_of<random_access_traversal_tag, typename traits::category_of<First>::type>::value
>::type
type;
template <typename Iterator>
static type
recursive_call(Iterator const& iter, mpl::true_)
{
return iter;
}
template <typename Iterator>
static type
recursive_call(Iterator const& iter, mpl::false_)
{
return recursive_call(fusion::next(iter));
}
template <typename Iterator>
static type
recursive_call(Iterator const& iter)
{
typedef result_of::equal_to<Iterator, type> found;
return recursive_call(iter, found());
}
template <typename Iterator, typename Tag>
static type
choose_call(Iterator const& iter, Tag)
{
return recursive_call(iter);
}
template <typename Iterator>
static type
choose_call(Iterator const& iter, random_access_traversal_tag)
{
typedef typename result_of::distance<Iterator, type>::type N;
return fusion::advance<N>(iter);
}
template <typename Iterator>
static type
call(Iterator const& iter)
{
return choose_call(iter, typename traits::category_of<Iterator>::type());
}
};
template <typename First, typename Last, typename Pred>
struct static_seq_find_if : static_find_if<First, Last, Pred>
{
typedef typename static_find_if<First, Last, Pred>::type type;
template <typename Sequence>
static type
call(Sequence const& seq)
{
return static_find_if<First, Last, Pred>::call(fusion::begin(seq));
}
template <typename Sequence>
static type
call(Sequence& seq)
{
return static_find_if<First, Last, Pred>::call(fusion::begin(seq));
}
};
}}}
#endif

View File

@ -1,222 +0,0 @@
/*=============================================================================
Copyright (c) 2006 Eric Niebler
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FIND_IF_S_05152006_1027)
#define FIND_IF_S_05152006_1027
#include <boost/mpl/not.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/fusion/algorithm/query/find_if.hpp>
#include <boost/fusion/sequence/container/list/cons.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp>
#include <boost/fusion/sequence/view/ext_/segmented_iterator.hpp>
#include <boost/fusion/sequence/view/ext_/segmented_iterator_range.hpp>
#include <boost/fusion/support/ext_/is_segmented.hpp>
// fwd declarations
namespace boost { namespace fusion
{
namespace detail
{
template<typename Sequence, typename Pred, bool IsSegmented = traits::is_segmented<Sequence>::value>
struct static_find_if_s_recurse;
}
namespace result_of
{
template <typename Sequence, typename Pred>
struct find_if_s;
}
}}
namespace boost { namespace fusion { namespace detail
{
template<typename Sequence, typename Where, bool IsSegmented = traits::is_segmented<Sequence>::value>
struct is_found
: mpl::not_<result_of::equal_to<Where, typename result_of::end<Sequence>::type> >
{};
template<typename Sequence, typename Cons>
struct is_found<Sequence, Cons, true>
: mpl::not_<is_same<nil, Cons> >
{};
template<
typename SegmentedRange
, typename Where
, typename Sequence = typename remove_reference<
typename result_of::deref<
typename SegmentedRange::iterator_type
>::type
>::type
, bool IsSegmented = traits::is_segmented<Sequence>::value
>
struct as_segmented_cons
{
typedef cons<
SegmentedRange
, cons<segmented_range<Sequence, Where, false> >
> type;
static type call(SegmentedRange const &range, Where const &where)
{
return fusion::make_cons(
range
, fusion::make_cons(
segmented_range<Sequence, Where, false>(*fusion::begin(range), where)
)
);
}
};
template<
typename SegmentedRange
, typename Where
, typename Sequence
>
struct as_segmented_cons<SegmentedRange, Where, Sequence, true>
{
typedef cons<SegmentedRange, Where> type;
static type call(SegmentedRange const &range, Where const &where)
{
return fusion::make_cons(range, where);
}
};
template<
typename SegmentedRange
, typename Pred
, bool IsEmpty = is_empty<SegmentedRange>::value
>
struct static_find_if_s_seg
{
typedef typename SegmentedRange::iterator_type first;
typedef typename result_of::deref<first>::type segment_ref;
typedef typename remove_reference<segment_ref>::type segment;
typedef static_find_if_s_recurse<segment, Pred> where;
typedef range_next<SegmentedRange> next;
typedef is_found<segment, typename where::type> is_found;
typedef as_segmented_cons<SegmentedRange, typename where::type> found;
typedef static_find_if_s_seg<typename next::type, Pred> not_found;
typedef typename mpl::eval_if<is_found, found, not_found>::type type;
static type call(SegmentedRange const &range)
{
return call_(range, is_found());
}
private:
static type call_(SegmentedRange const &range, mpl::true_)
{
return found::call(range, where::call(*range.where));
}
static type call_(SegmentedRange const &range, mpl::false_)
{
return not_found::call(next::call(range));
}
};
template<
typename SegmentedRange
, typename Pred
>
struct static_find_if_s_seg<SegmentedRange, Pred, true>
{
typedef nil type;
static type call(SegmentedRange const &)
{
return nil();
}
};
template<typename Sequence, typename Pred>
struct static_find_if_s_recurse<Sequence, Pred, true>
{
typedef typename as_segmented_range<Sequence>::type range;
typedef static_find_if_s_seg<range, Pred> find_if;
typedef typename find_if::type type;
static type call(Sequence &seq)
{
return find_if::call(range(fusion::segments(seq)));
}
};
template<typename Sequence, typename Pred>
struct static_find_if_s_recurse<Sequence, Pred, false>
{
typedef typename result_of::find_if<Sequence, Pred>::type type;
static type call(Sequence &seq)
{
return fusion::find_if<Pred>(seq);
}
};
template<typename Sequence, typename Pred, bool IsSegmented = traits::is_segmented<Sequence>::value>
struct static_find_if_s
: static_find_if_s_recurse<Sequence, Pred, IsSegmented>
{};
template<typename Sequence, typename Pred>
struct static_find_if_s<Sequence, Pred, true>
{
typedef typename as_segmented_range<Sequence>::type range;
typedef static_find_if_s_recurse<Sequence, Pred> find_if;
typedef typename find_if::type found;
typedef segmented_iterator<typename reverse_cons<found>::type> type;
static type call(Sequence &seq)
{
return type(reverse_cons<found>::call(find_if::call(seq)));
}
};
}}}
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename Pred>
struct find_if_s
{
typedef typename
detail::static_find_if_s<
Sequence
, Pred
>::type
type;
};
}
template <typename Pred, typename Sequence>
typename lazy_disable_if<
is_const<Sequence>
, result_of::find_if_s<Sequence, Pred>
>::type
find_if_s(Sequence& seq)
{
return detail::static_find_if_s<Sequence, Pred>::call(seq);
}
template <typename Pred, typename Sequence>
typename result_of::find_if_s<Sequence const, Pred>::type
find_if_s(Sequence const& seq)
{
return detail::static_find_if_s<Sequence const, Pred>::call(seq);
}
}}
#endif

View File

@ -1,75 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_FIND_05052005_1107)
#define FUSION_FIND_05052005_1107
#include <boost/fusion/algorithm/query/detail/find_if.hpp>
#include <boost/fusion/algorithm/query/detail/assoc_find.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion
{
struct associative_sequence_tag;
namespace result_of
{
template <
typename Sequence
, typename T
, bool is_associative_sequence = traits::is_associative<Sequence>::value >
struct find;
template <typename Sequence, typename T>
struct find<Sequence, T, false>
{
typedef
detail::static_seq_find_if<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type
, is_same<mpl::_, T>
>
filter;
typedef typename filter::type type;
};
template <typename Sequence, typename T>
struct find<Sequence, T, true>
{
typedef detail::assoc_find<Sequence, T> filter;
typedef typename filter::type type;
};
}
template <typename T, typename Sequence>
inline typename
lazy_disable_if<
is_const<Sequence>
, result_of::find<Sequence, T>
>::type const
find(Sequence& seq)
{
typedef typename result_of::find<Sequence, T>::filter filter;
return filter::call(seq);
}
template <typename T, typename Sequence>
inline typename result_of::find<Sequence const, T>::type const
find(Sequence const& seq)
{
typedef typename result_of::find<Sequence const, T>::filter filter;
return filter::call(seq);
}
}}
#endif

View File

@ -1,69 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_FIND_IF_05052005_1108)
#define FUSION_FIND_IF_05052005_1108
#include <boost/fusion/algorithm/query/detail/find_if.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_const.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename Pred>
struct find_if
{
typedef typename
detail::static_find_if<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type
, Pred
>::type
type;
};
}
template <typename Pred, typename Sequence>
inline typename
lazy_disable_if<
is_const<Sequence>
, result_of::find_if<Sequence, Pred>
>::type
find_if(Sequence& seq)
{
typedef
detail::static_find_if<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type
, Pred
>
filter;
return filter::call(fusion::begin(seq));
}
template <typename Pred, typename Sequence>
inline typename result_of::find_if<Sequence const, Pred>::type const
find_if(Sequence const& seq)
{
typedef
detail::static_find_if<
typename result_of::begin<Sequence const>::type
, typename result_of::end<Sequence const>::type
, Pred
>
filter;
return filter::call(fusion::begin(seq));
}
}}
#endif

View File

@ -1,33 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_NONE_07062005_1128)
#define BOOST_FUSION_NONE_07062005_1128
#include <boost/fusion/algorithm/query/any.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename F>
struct none
{
typedef bool type;
};
}
template <typename Sequence, typename F>
inline bool
none(Sequence const& seq, F f)
{
return !fusion::any(seq, f);
}
}}
#endif

View File

@ -1,28 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ALGORITHM_TRANSFORMATION_10022005_0551)
#define FUSION_ALGORITHM_TRANSFORMATION_10022005_0551
#include <boost/fusion/algorithm/transformation/clear.hpp>
#include <boost/fusion/algorithm/transformation/erase.hpp>
#include <boost/fusion/algorithm/transformation/erase_key.hpp>
#include <boost/fusion/algorithm/transformation/filter.hpp>
#include <boost/fusion/algorithm/transformation/filter_if.hpp>
#include <boost/fusion/algorithm/transformation/insert.hpp>
#include <boost/fusion/algorithm/transformation/insert_range.hpp>
#include <boost/fusion/algorithm/transformation/pop_back.hpp>
#include <boost/fusion/algorithm/transformation/pop_front.hpp>
#include <boost/fusion/algorithm/transformation/push_back.hpp>
#include <boost/fusion/algorithm/transformation/push_front.hpp>
#include <boost/fusion/algorithm/transformation/remove.hpp>
#include <boost/fusion/algorithm/transformation/remove_if.hpp>
#include <boost/fusion/algorithm/transformation/replace.hpp>
#include <boost/fusion/algorithm/transformation/replace_if.hpp>
#include <boost/fusion/algorithm/transformation/reverse.hpp>
#include <boost/fusion/algorithm/transformation/transform.hpp>
#endif

View File

@ -1,32 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_CLEAR_09172005_1127)
#define FUSION_CLEAR_09172005_1127
#include <boost/fusion/sequence/container/vector/vector10.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence>
struct clear
{
typedef vector0 type;
};
}
template <typename Sequence>
inline typename result_of::clear<Sequence const>::type
clear(Sequence const& seq)
{
return vector0();
}
}}
#endif

View File

@ -1,73 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_REPLACE_08182005_0841)
#define FUSION_REPLACE_08182005_0841
#include <boost/type_traits/is_convertible.hpp>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/remove_reference.hpp>
namespace boost { namespace fusion { namespace detail
{
template <bool is_convertible>
struct replacer_helper;
template <>
struct replacer_helper<false>
{
template <typename U, typename T>
static U&
call(U& x, T const&, T const&)
{
return x;
}
};
template <>
struct replacer_helper<true>
{
template <typename U, typename T>
static U
call(U& x, T const& old_value, T const& new_value)
{
return (x == old_value) ? new_value : x;
}
};
template <typename T>
struct replacer
{
replacer(T const& old_value, T const& new_value)
: old_value(old_value), new_value(new_value) {}
template<typename Sig>
struct result;
template <typename U1, typename U2>
struct result<replacer<U1>(U2)>
{
typedef typename remove_reference<U2>::type value;
typedef typename
mpl::if_<is_convertible<T, value>, value, value const&>::type
type;
};
template <typename U>
typename result<replacer(U)>::type
operator()(U const& x) const
{
return replacer_helper<is_convertible<T, U>::value>::
call(x, old_value, new_value);
}
T old_value;
T new_value;
};
}}}
#endif

View File

@ -1,73 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_REPLACE_IF_08182005_0946)
#define FUSION_REPLACE_IF_08182005_0946
#include <boost/utility/enable_if.hpp>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/remove_reference.hpp>
namespace boost { namespace fusion { namespace detail
{
template <bool is_convertible>
struct replacer_if_helper;
template <>
struct replacer_if_helper<false>
{
template <typename U, typename F, typename T>
static U&
call(U& x, F&, T const&)
{
return x;
}
};
template <>
struct replacer_if_helper<true>
{
template <typename U, typename F, typename T>
static U
call(U& x, F& f, T const& new_value)
{
return f(x) ? new_value : x;
}
};
template <typename F, typename T>
struct replacer_if
{
replacer_if(F f, T const& new_value)
: f(f), new_value(new_value) {}
template<typename Params>
struct result;
template <typename F1, typename T1, typename U>
struct result<replacer_if<F1, T1>(U)>
{
typedef typename remove_reference<U>::type value;
typedef typename
mpl::if_<is_convertible<T, value>, value, value const&>::type
type;
};
template <typename U>
typename result<replacer_if(U)>::type
operator()(U const& x) const
{
return replacer_if_helper<is_convertible<T, U>::value>::
call(x, f, new_value);
}
F f;
T new_value;
};
}}}
#endif

View File

@ -1,107 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ERASE_07232005_0534)
#define FUSION_ERASE_07232005_0534
#include <boost/fusion/sequence/container/vector/vector10.hpp>
#include <boost/fusion/sequence/view/joint_view/joint_view.hpp>
#include <boost/fusion/sequence/view/iterator_range/iterator_range.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename First>
struct compute_erase_last // put this in detail!!!
{
typedef typename result_of::end<Sequence>::type seq_last_type;
typedef typename convert_iterator<First>::type first_type;
typedef typename
mpl::if_<
result_of::equal_to<first_type, seq_last_type>
, first_type
, typename result_of::next<first_type>::type
>::type
type;
static type
call(First const& first, mpl::false_)
{
return fusion::next(convert_iterator<First>::call(first));
}
static type
call(First const& first, mpl::true_)
{
return convert_iterator<First>::call(first);
}
static type
call(First const& first)
{
return call(first, result_of::equal_to<first_type, seq_last_type>());
}
};
template <
typename Sequence
, typename First
, typename Last = typename compute_erase_last<Sequence, First>::type>
struct erase
{
typedef typename result_of::begin<Sequence>::type seq_first_type;
typedef typename result_of::end<Sequence>::type seq_last_type;
BOOST_STATIC_ASSERT((!result_of::equal_to<seq_first_type, seq_last_type>::value));
typedef typename convert_iterator<First>::type first_type;
typedef typename convert_iterator<Last>::type last_type;
typedef iterator_range<seq_first_type, first_type> left_type;
typedef iterator_range<last_type, seq_last_type> right_type;
typedef joint_view<left_type, right_type> type;
};
}
template <typename Sequence, typename First>
typename result_of::erase<Sequence const, First>::type
erase(Sequence const& seq, First const& first)
{
typedef result_of::erase<Sequence const, First> result_of;
typedef typename result_of::left_type left_type;
typedef typename result_of::right_type right_type;
typedef typename result_of::type result_type;
left_type left(
fusion::begin(seq)
, convert_iterator<First>::call(first));
right_type right(
fusion::result_of::compute_erase_last<Sequence const, First>::call(first)
, fusion::end(seq));
return result_type(left, right);
}
template <typename Sequence, typename First, typename Last>
typename result_of::erase<Sequence const, First, Last>::type
erase(Sequence const& seq, First const& first, Last const& last)
{
typedef result_of::erase<Sequence const, First, Last> result_of;
typedef typename result_of::left_type left_type;
typedef typename result_of::right_type right_type;
typedef typename result_of::type result_type;
left_type left(fusion::begin(seq), first);
right_type right(last, fusion::end(seq));
return result_type(left, right);
}
}}
#endif

View File

@ -1,37 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_ERASE_KEY_10022005_1851)
#define FUSION_ERASE_KEY_10022005_1851
#include <boost/fusion/algorithm/query/detail/assoc_find.hpp>
#include <boost/fusion/algorithm/transformation/erase.hpp>
#include <boost/mpl/not.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename Key>
struct erase_key
{
typedef detail::assoc_find<Sequence, Key> filter;
typedef typename erase<Sequence, typename filter::type>::type type;
};
}
template <typename Key, typename Sequence>
inline typename result_of::erase_key<Sequence const, Key>::type
erase_key(Sequence const& seq)
{
typedef typename result_of::erase_key<Sequence const, Key>::filter filter;
return erase(seq, filter::call(seq));
}
}}
#endif

View File

@ -1,34 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_FILTER_02122005_1839)
#define FUSION_FILTER_02122005_1839
#include <boost/fusion/sequence/view/filter_view/filter_view.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename T>
struct filter
{
typedef filter_view<Sequence, is_same<mpl::_, T> > type;
};
}
template <typename T, typename Sequence>
inline typename result_of::filter<Sequence const, T>::type
filter(Sequence const& seq)
{
return filter_view<const Sequence, is_same<mpl::_, T> >(seq);
}
}}
#endif

View File

@ -1,32 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_FILTER_IF_07172005_0818)
#define FUSION_FILTER_IF_07172005_0818
#include <boost/fusion/sequence/view/filter_view/filter_view.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename Pred>
struct filter_if
{
typedef filter_view<Sequence, Pred> type;
};
}
template <typename Pred, typename Sequence>
inline typename result_of::filter_if<Sequence const, Pred>::type
filter_if(Sequence const& seq)
{
return filter_view<Sequence const, Pred>(seq);
}
}}
#endif

View File

@ -1,62 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INSERT_07222005_0730)
#define FUSION_INSERT_07222005_0730
#include <boost/fusion/sequence/container/vector/vector10.hpp>
#include <boost/fusion/sequence/view/joint_view/joint_view.hpp>
#include <boost/fusion/sequence/view/single_view/single_view.hpp>
#include <boost/fusion/sequence/view/iterator_range/iterator_range.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename Position, typename T>
struct insert
{
typedef typename detail::as_fusion_element<T>::type element_type;
typedef typename convert_iterator<Position>::type pos_type;
typedef typename result_of::begin<Sequence>::type first_type;
typedef typename result_of::end<Sequence>::type last_type;
typedef iterator_range<first_type, pos_type> left_type;
typedef iterator_range<pos_type, last_type> right_type;
typedef fusion::single_view<element_type> single_view;
typedef joint_view<left_type, single_view const> left_insert_type;
typedef joint_view<left_insert_type, right_type> type;
};
}
template <typename Sequence, typename Position, typename T>
inline typename result_of::insert<
Sequence const, Position, T>::type
insert(Sequence const& seq, Position const& pos, T const& x)
{
typedef result_of::insert<
Sequence const, Position, T>
result_of;
typedef typename result_of::left_type left_type;
typedef typename result_of::right_type right_type;
typedef typename result_of::single_view single_view;
typedef typename result_of::left_insert_type left_insert_type;
typedef typename result_of::type result;
left_type left(fusion::begin(seq), convert_iterator<Position>::call(pos));
right_type right(convert_iterator<Position>::call(pos), fusion::end(seq));
single_view insert(x);
left_insert_type left_insert(left, insert);
return result(left_insert, right);
}
}}
#endif

View File

@ -1,54 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INSERT_RANGE_009172005_1147)
#define FUSION_INSERT_RANGE_009172005_1147
#include <boost/fusion/sequence/container/vector/vector10.hpp>
#include <boost/fusion/sequence/view/joint_view/joint_view.hpp>
#include <boost/fusion/sequence/view/iterator_range/iterator_range.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/mpl/convert_iterator.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename Position, typename Range>
struct insert_range
{
typedef typename convert_iterator<Position>::type pos_type;
typedef typename result_of::begin<Sequence>::type first_type;
typedef typename result_of::end<Sequence>::type last_type;
typedef iterator_range<first_type, pos_type> left_type;
typedef iterator_range<pos_type, last_type> right_type;
typedef joint_view<left_type, Range> left_insert_type;
typedef joint_view<left_insert_type, right_type> type;
};
}
template <typename Sequence, typename Position, typename Range>
inline typename result_of::insert_range<Sequence const, Position, Range const>::type
insert_range(Sequence const& seq, Position const& pos, Range const& range)
{
typedef result_of::insert_range<Sequence const, Position, Range const> result_of;
typedef typename result_of::left_type left_type;
typedef typename result_of::right_type right_type;
typedef typename result_of::left_insert_type left_insert_type;
typedef typename result_of::type result;
left_type left(fusion::begin(seq), convert_iterator<Position>::call(pos));
right_type right(convert_iterator<Position>::call(pos), fusion::end(seq));
left_insert_type left_insert(left, range);
return result(left_insert, right);
}
}}
#endif

View File

@ -1,33 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2006 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_JOIN_200601222109)
#define FUSION_JOIN_200601222109
#include <boost/fusion/sequence/view/joint_view.hpp>
namespace boost { namespace fusion {
namespace result_of
{
template<typename LhSequence, typename RhSequence>
struct join
{
typedef joint_view<LhSequence, RhSequence> type;
};
}
template<typename LhSequence, typename RhSequence>
inline typename result_of::join<LhSequence const, RhSequence const>::type
join(LhSequence const& lhs, RhSequence const& rhs)
{
return typename result_of::join<LhSequence const, RhSequence const>::type(
lhs, rhs);
}
}}
#endif

View File

@ -1,43 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_POP_BACK_09172005_1038)
#define FUSION_POP_BACK_09172005_1038
#include <boost/fusion/sequence/view/iterator_range/iterator_range.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/prior.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence>
struct pop_back
{
typedef
iterator_range<
typename begin<Sequence>::type
, typename prior<
typename end<Sequence>::type
>::type
>
type;
};
}
template <typename Sequence>
inline typename result_of::pop_back<Sequence const>::type
pop_back(Sequence const& seq)
{
typedef typename result_of::pop_back<Sequence const>::type result;
return result(fusion::begin(seq), fusion::prior(fusion::end(seq)));
}
}}
#endif

View File

@ -1,43 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_POP_FRONT_09172005_1115)
#define FUSION_POP_FRONT_09172005_1115
#include <boost/fusion/sequence/view/iterator_range/iterator_range.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/iterator/next.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence>
struct pop_front
{
typedef
iterator_range<
typename next<
typename begin<Sequence>::type
>::type
, typename end<Sequence>::type
>
type;
};
}
template <typename Sequence>
inline typename result_of::pop_front<Sequence const>::type
pop_front(Sequence const& seq)
{
typedef typename result_of::pop_front<Sequence const>::type result;
return result(fusion::next(fusion::begin(seq)), fusion::end(seq));
}
}}
#endif

View File

@ -1,39 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_PUSH_BACK_07162005_0235)
#define FUSION_PUSH_BACK_07162005_0235
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/sequence/view/joint_view/joint_view.hpp>
#include <boost/fusion/sequence/view/single_view/single_view.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename T>
struct push_back
{
typedef fusion::single_view<typename detail::as_fusion_element<T>::type> single_view;
typedef joint_view<Sequence, single_view const> type;
};
}
template <typename Sequence, typename T>
inline typename result_of::push_back<Sequence const, T>::type
push_back(Sequence const& seq, T const& x)
{
typedef typename result_of::push_back<Sequence const, T> push_back;
typedef typename push_back::single_view single_view;
typedef typename push_back::type result;
single_view x_(x);
return result(seq, x_);
}
}}
#endif

View File

@ -1,39 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_PUSH_FRONT_07162005_0749)
#define FUSION_PUSH_FRONT_07162005_0749
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/sequence/view/joint_view/joint_view.hpp>
#include <boost/fusion/sequence/view/single_view/single_view.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename T>
struct push_front
{
typedef fusion::single_view<typename detail::as_fusion_element<T>::type> single_view;
typedef joint_view<single_view const, Sequence> type;
};
}
template <typename Sequence, typename T>
inline typename result_of::push_front<Sequence const, T>::type
push_front(Sequence const& seq, T const& x)
{
typedef typename result_of::push_front<Sequence const, T> push_front;
typedef typename push_front::single_view single_view;
typedef typename push_front::type result;
single_view x_(x);
return result(x_, seq);
}
}}
#endif

View File

@ -1,35 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_REMOVE_07162005_0818)
#define FUSION_REMOVE_07162005_0818
#include <boost/fusion/sequence/view/filter_view/filter_view.hpp>
#include <boost/mpl/not.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename T>
struct remove
{
typedef filter_view<Sequence, mpl::not_<is_same<mpl::_, T> > > type;
};
}
template <typename T, typename Sequence>
inline typename result_of::remove<Sequence const, T>::type
remove(Sequence const& seq)
{
typedef typename result_of::remove<Sequence const, T>::type result_type;
return result_type(seq);
}
}}
#endif

View File

@ -1,35 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_REMOVE_IF_07162005_0818)
#define FUSION_REMOVE_IF_07162005_0818
#include <boost/fusion/sequence/view/filter_view/filter_view.hpp>
#include <boost/mpl/not.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename Pred>
struct remove_if
{
typedef filter_view<Sequence, mpl::not_<Pred> > type;
};
}
template <typename Pred, typename Sequence>
inline typename result_of::remove_if<Sequence const, Pred>::type
remove_if(Sequence const& seq)
{
typedef typename result_of::remove_if<Sequence const, Pred>::type result_type;
return result_type(seq);
}
}}
#endif

View File

@ -1,35 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_REPLACE_08182005_0830)
#define FUSION_REPLACE_08182005_0830
#include <boost/fusion/sequence/view/transform_view/transform_view.hpp>
#include <boost/fusion/algorithm/transformation/detail/replace.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename T>
struct replace
{
typedef transform_view<Sequence, detail::replacer<T> > type;
};
}
template <typename Sequence, typename T>
inline typename result_of::replace<Sequence const, T>::type
replace(Sequence const& seq, T const& old_value, T const& new_value)
{
typedef typename result_of::replace<Sequence const, T>::type result;
detail::replacer<T> f(old_value, new_value);
return result(seq, f);
}
}}
#endif

View File

@ -1,37 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_REPLACE_IF_08182005_0939)
#define FUSION_REPLACE_IF_08182005_0939
#include <boost/fusion/sequence/view/transform_view/transform_view.hpp>
#include <boost/fusion/algorithm/transformation/detail/replace_if.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename F, typename T>
struct replace_if
{
typedef transform_view<Sequence, detail::replacer_if<F, T> > type;
};
}
template <typename Sequence, typename F, typename T>
inline typename result_of::replace_if<Sequence const, F, T>::type
replace_if(Sequence const& seq, F pred, T const& new_value)
{
typedef typename result_of::replace_if<Sequence const, F, T>::type result;
detail::replacer_if<F, T> f(pred, new_value);
return result(seq, f);
}
}}
#endif

View File

@ -1,32 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_REVERSE_07212005_1230)
#define FUSION_REVERSE_07212005_1230
#include <boost/fusion/sequence/view/reverse_view/reverse_view.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence>
struct reverse
{
typedef reverse_view<Sequence> type;
};
}
template <typename Sequence>
inline reverse_view<Sequence const>
reverse(Sequence const& view)
{
return reverse_view<Sequence const>(view);
}
}}
#endif

View File

@ -1,47 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_TRANSFORM_07052005_1057)
#define FUSION_TRANSFORM_07052005_1057
#include <boost/fusion/sequence/view/transform_view/transform_view.hpp>
namespace boost { namespace fusion
{
struct void_;
namespace result_of
{
template <typename Sequence1, typename Sequence2, typename F = void_>
struct transform
{
typedef transform_view<Sequence1, Sequence2, F> type;
};
template <typename Sequence, typename F>
struct transform<Sequence, F>
{
typedef transform_view<Sequence, F> type;
};
}
template <typename Sequence, typename F>
inline typename result_of::transform<Sequence const, F>::type
transform(Sequence const& seq, F f)
{
return transform_view<Sequence const, F>(seq, f);
}
template <typename Sequence1, typename Sequence2, typename F>
inline typename result_of::transform<Sequence1 const, Sequence2 const, F>::type
transform(Sequence1 const& seq1, Sequence2 const& seq2, F f)
{
return transform_view<Sequence1 const, Sequence2 const, F>(seq1, seq2, f);
}
}}
#endif

View File

@ -1,79 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
Copyright (c) 2006 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_ZIP_HPP_20060125_2058)
#define FUSION_ZIP_HPP_20060125_2058
#include <boost/fusion/sequence/view/zip_view.hpp>
#include <boost/fusion/sequence/adapted/mpl.hpp>
#include <boost/fusion/sequence/container/vector.hpp>
#include <boost/fusion/sequence/conversion/as_vector.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/arithmetic/inc.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/mpl/vector.hpp>
#include <boost/mpl/transform.hpp>
#include <boost/mpl/placeholders.hpp>
#if !defined(FUSION_MAX_ZIP_SEQUENCES)
#define FUSION_MAX_ZIP_SEQUENCES 10
#endif
namespace boost { namespace fusion {
struct void_;
namespace result_of
{
template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_INC(FUSION_MAX_ZIP_SEQUENCES), typename T, fusion::void_)>
struct zip;
}
#define BOOST_PP_FILENAME_1 \
<boost/fusion/algorithm/transformation/zip.hpp>
#define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_ZIP_SEQUENCES)
#include BOOST_PP_ITERATE()
}}
#endif
#else
#define ZIP_ITERATION BOOST_PP_ITERATION()
namespace result_of
{
template< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, typename T) >
struct zip< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) >
{
typedef mpl::vector< BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, T) > sequences;
typedef typename mpl::transform<sequences, add_reference<mpl::_> >::type ref_params;
typedef zip_view<typename result_of::as_vector<ref_params>::type> type;
};
}
#define FUSION_REF_PARAM(z, n, data) const T ## n&
template<BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, typename T)>
inline typename result_of::zip<BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, const T)>::type
zip(BOOST_PP_ENUM_BINARY_PARAMS(ZIP_ITERATION, T, const& t))
{
fusion::vector<BOOST_PP_ENUM(ZIP_ITERATION, FUSION_REF_PARAM, _)> seqs(
BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, t));
return typename result_of::zip<BOOST_PP_ENUM_PARAMS(ZIP_ITERATION, const T)>::type(
seqs);
}
#undef FUSION_REF_PARAM
#undef ZIP_ITERATION
#endif

View File

@ -1,17 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_HPP_INCLUDED
#include <boost/fusion/functional/invocation.hpp>
#include <boost/fusion/functional/adapter.hpp>
#include <boost/fusion/functional/generation.hpp>
#endif

View File

@ -1,18 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP_INCLUDED
#include <boost/fusion/functional/adapter/fused.hpp>
#include <boost/fusion/functional/adapter/fused_procedure.hpp>
#include <boost/fusion/functional/adapter/fused_function_object.hpp>
#include <boost/fusion/functional/adapter/unfused_generic.hpp>
#include <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
#include <boost/fusion/functional/adapter/unfused_typed.hpp>
#endif

View File

@ -1,41 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_ACCESS_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_ACCESS_HPP_INCLUDED
namespace boost { namespace fusion { namespace detail
{
// const reference deduction for function templates that accept T const &
template <typename T> struct cref { typedef T const& type; };
template <typename T> struct cref<T&> { typedef T const& type; };
template <typename T> struct cref<T const> { typedef T const& type; };
// mutable reference deduction for function templates that accept T &
template <typename T> struct mref { typedef T & type; };
template <typename T> struct mref<T&> { typedef T & type; };
// generic reference deduction for function templates that are overloaded
// to accept both T const & and T &
template <typename T> struct gref { typedef T const& type; };
template <typename T> struct gref<T&> { typedef T & type; };
template <typename T> struct gref<T const> { typedef T const& type; };
// appropriately qualified target function in const context
template <typename T> struct qf_c { typedef T const type; };
template <typename T> struct qf_c<T const> { typedef T const type; };
template <typename T> struct qf_c<T &> { typedef T type; };
// appropriately qualified target function in non-const context
template <typename T> struct qf { typedef T type; };
template <typename T> struct qf<T const> { typedef T const type; };
template <typename T> struct qf<T &> { typedef T type; };
}}}
#endif

View File

@ -1,118 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_PP_IS_ITERATING)
# error "This file has to be included by a preprocessor loop construct!"
#elif BOOST_PP_ITERATION_DEPTH() == 1
# if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_POW2_EXPLODE_HPP_INCLUDED)
# include <boost/preprocessor/config/limits.hpp>
# include <boost/preprocessor/slot/slot.hpp>
# include <boost/preprocessor/arithmetic/dec.hpp>
# define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_POW2_EXPLODE_HPP_INCLUDED
# endif
# define BOOST_PP_VALUE 0
# include BOOST_PP_ASSIGN_SLOT(1)
# define BOOST_PP_FILENAME_2 \
<boost/fusion/functional/adapter/detail/pow2_explode.hpp>
# define BOOST_PP_VALUE (1 << N) >> 4
# if BOOST_PP_VALUE > BOOST_PP_LIMIT_ITERATION
# error "Preprocessor limit exceeded."
# endif
# include BOOST_PP_ASSIGN_SLOT(2)
# define BOOST_PP_ITERATION_LIMITS (0,BOOST_PP_DEC(BOOST_PP_SLOT_2()))
# include BOOST_PP_ITERATE()
#elif BOOST_PP_ITERATION_DEPTH() == 2
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# if BOOST_PP_SLOT_1() < 1 << N
# include BOOST_PP_INDIRECT_SELF
# define BOOST_PP_VALUE BOOST_PP_SLOT_1() + 1
# include BOOST_PP_ASSIGN_SLOT(1)
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
# endif
#endif

View File

@ -1,71 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
// No include guard - this file is included multiple times intentionally.
#if BOOST_PP_SLOT_1() & 0x001
# define PT0 T0 &
#else
# define PT0 T0 const &
#endif
#if BOOST_PP_SLOT_1() & 0x002
# define PT1 T1 &
#else
# define PT1 T1 const &
#endif
#if BOOST_PP_SLOT_1() & 0x004
# define PT2 T2 &
#else
# define PT2 T2 const &
#endif
#if BOOST_PP_SLOT_1() & 0x008
# define PT3 T3 &
#else
# define PT3 T3 const &
#endif
#if BOOST_PP_SLOT_1() & 0x010
# define PT4 T4 &
#else
# define PT4 T4 const &
#endif
#if BOOST_PP_SLOT_1() & 0x020
# define PT5 T5 &
#else
# define PT5 T5 const &
#endif
#if BOOST_PP_SLOT_1() & 0x040
# define PT6 T6 &
#else
# define PT6 T6 const &
#endif
#if BOOST_PP_SLOT_1() & 0x080
# define PT7 T7 &
#else
# define PT7 T7 const &
#endif
#if BOOST_PP_SLOT_1() & 0x100
# define PT8 T8 &
#else
# define PT8 T8 const &
#endif
#if BOOST_PP_SLOT_1() & 0x200
# define PT9 T9 &
#else
# define PT9 T9 const &
#endif
#if BOOST_PP_SLOT_1() & 0x400
# define PT10 T10 &
#else
# define PT10 T10 const &
#endif
#if BOOST_PP_SLOT_1() & 0x800
# define PT11 T11 &
#else
# define PT11 T11 const &
#endif

View File

@ -1,23 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
// No include guard - this file is included multiple times intentionally.
#undef PT0
#undef PT1
#undef PT2
#undef PT3
#undef PT4
#undef PT5
#undef PT6
#undef PT7
#undef PT8
#undef PT9
#undef PT10
#undef PT11

View File

@ -1,85 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP_INCLUDED
#include <boost/type_traits/add_reference.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
#include <boost/fusion/functional/invocation/invoke.hpp>
namespace boost { namespace fusion
{
template <typename Function> class fused;
//----- ---- --- -- - - - -
template <typename Function>
class fused
{
Function fnc_transformed;
typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
typedef typename detail::qf<Function>::type & func_fwd_t;
public:
inline explicit fused(func_const_fwd_t f = Function())
: fnc_transformed(f)
{ }
template <class Seq>
inline typename result_of::invoke<func_const_fwd_t,Seq const>::type
operator()(Seq const & s) const
{
return fusion::invoke<func_const_fwd_t>(this->fnc_transformed,s);
}
template <class Seq>
inline typename result_of::invoke<func_fwd_t,Seq const>::type
operator()(Seq const & s)
{
return fusion::invoke<func_fwd_t>(this->fnc_transformed,s);
}
template <class Seq>
inline typename result_of::invoke<func_const_fwd_t,Seq>::type
operator()(Seq & s) const
{
return fusion::invoke<func_const_fwd_t>(this->fnc_transformed,s);
}
template <class Seq>
inline typename result_of::invoke<func_fwd_t,Seq>::type
operator()(Seq & s)
{
return fusion::invoke<func_fwd_t>(this->fnc_transformed,s);
}
template <typename Sig>
struct result;
template <class Self, class Seq>
struct result< Self const (Seq) >
: result_of::invoke<func_const_fwd_t,
typename boost::remove_reference<Seq>::type >
{ };
template <class Self, class Seq>
struct result< Self(Seq) >
: result_of::invoke<func_fwd_t,
typename boost::remove_reference<Seq>::type >
{ };
};
}}
#endif

View File

@ -1,90 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP_INCLUDED
#include <boost/type_traits/add_reference.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
namespace boost { namespace fusion
{
template <class Function> class fused_function_object;
//----- ---- --- -- - - - -
template <class Function>
class fused_function_object
{
Function fnc_transformed;
typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
typedef typename detail::qf<Function>::type & func_fwd_t;
public:
inline explicit fused_function_object(func_const_fwd_t f = Function())
: fnc_transformed(f)
{ }
template <class Seq>
inline typename result_of::invoke_function_object<func_const_fwd_t,
Seq const>::type operator()(Seq const & s) const
{
return fusion::invoke_function_object<
func_const_fwd_t >(this->fnc_transformed,s);
}
template <class Seq>
inline typename result_of::invoke_function_object<func_fwd_t,
Seq const>::type
operator()(Seq const & s)
{
return fusion::invoke_function_object<
func_fwd_t >(this->fnc_transformed,s);
}
template <class Seq>
inline typename result_of::invoke_function_object<func_const_fwd_t,
Seq>::type
operator()(Seq & s) const
{
return fusion::invoke_function_object<
func_const_fwd_t >(this->fnc_transformed,s);
}
template <class Seq>
inline typename result_of::invoke_function_object<func_fwd_t,Seq>::type
operator()(Seq & s)
{
return fusion::invoke_function_object<
func_fwd_t >(this->fnc_transformed,s);
}
template <typename Sig>
struct result;
template <class Self, class Seq>
struct result< Self const (Seq) >
: result_of::invoke_function_object<func_const_fwd_t,
typename boost::remove_reference<Seq>::type >
{ };
template <class Self, class Seq>
struct result< Self(Seq) >
: result_of::invoke_function_object<func_fwd_t,
typename boost::remove_reference<Seq>::type >
{ };
};
}}
#endif

View File

@ -1,70 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP_INCLUDED
#include <boost/type_traits/add_reference.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
namespace boost { namespace fusion
{
template <typename Function> class fused_procedure;
//----- ---- --- -- - - - -
template <typename Function>
class fused_procedure
{
Function fnc_transformed;
typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
typedef typename detail::qf<Function>::type & func_fwd_t;
public:
inline explicit fused_procedure(func_const_fwd_t f = Function())
: fnc_transformed(f)
{ }
template <class Seq>
inline void operator()(Seq const & s) const
{
fusion::invoke_procedure<
func_const_fwd_t >(this->fnc_transformed,s);
}
template <class Seq>
inline void operator()(Seq const & s)
{
fusion::invoke_procedure<
func_fwd_t >(this->fnc_transformed,s);
}
template <class Seq>
inline void operator()(Seq & s) const
{
fusion::invoke_procedure<
func_const_fwd_t >(this->fnc_transformed,s);
}
template <class Seq>
inline void operator()(Seq & s)
{
return fusion::invoke_procedure<
func_fwd_t >(this->fnc_transformed,s);
}
typedef void result_type;
};
}}
#endif

View File

@ -1,39 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED)
# define BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP_INCLUDED
# include <boost/fusion/sequence/container/vector/limits.hpp>
# if !defined(BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY)
# define BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY 6
# elif BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
# error "BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
# endif
# if !defined(BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY)
# define BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY 6
# elif BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
# error "BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
# endif
# if !defined(BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY)
# define BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY 6
# elif BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
# error "BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
# endif
# if !defined(BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY)
# define BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY 6
# elif BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
# error "BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
# endif
# if !defined(BOOST_FUSION_CONSTRUCTOR_MAX_ARITY)
# define BOOST_FUSION_CONSTRUCTOR_MAX_ARITY 6
# endif
#endif

View File

@ -1,175 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_GENERIC_HPP_INCLUDED)
#if !defined(BOOST_PP_IS_ITERATING)
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/facilities/intercept.hpp>
#include <boost/fusion/sequence/container/vector/vector.hpp>
#include <boost/fusion/functional/adapter/limits.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
#include <boost/utility/result_of.hpp>
namespace boost { namespace fusion
{
template <class Function> class unfused_generic;
//----- ---- --- -- - - - -
template <class Function>
class unfused_generic
{
Function fnc_transformed;
typedef typename detail::qf_c<Function>::type function_c;
typedef typename detail::qf<Function>::type function;
typedef typename detail::call_param<Function>::type func_const_fwd_t;
public:
inline explicit unfused_generic(func_const_fwd_t f = Function())
: fnc_transformed(f)
{ }
template <typename Sig>
struct result;
typedef typename boost::result_of<
function_c(fusion::vector0 &) >::type call_const_0_result;
inline call_const_0_result operator()() const
{
fusion::vector0 arg;
return this->fnc_transformed(arg);
}
typedef typename boost::result_of<
function (fusion::vector0 &) >::type call_0_result;
inline call_0_result operator()()
{
fusion::vector0 arg;
return this->fnc_transformed(arg);
}
#define BOOST_FUSION_CODE(tpl_params,arg_types,params,args) \
template <tpl_params> \
inline typename boost::result_of<function_c( \
BOOST_PP_CAT(fusion::vector,N)<arg_types> & )>::type \
operator()(params) const \
{ \
BOOST_PP_CAT(fusion::vector,N)<arg_types> arg(args); \
return this->fnc_transformed(arg); \
} \
template <tpl_params> \
inline typename boost::result_of<function( \
BOOST_PP_CAT(fusion::vector,N)<arg_types> & )>::type \
operator()(params) \
{ \
BOOST_PP_CAT(fusion::vector,N)<arg_types> arg(args); \
return this->fnc_transformed(arg); \
}
#define BOOST_PP_INDIRECT_SELF \
<boost/fusion/functional/adapter/unfused_generic.hpp>
#define BOOST_PP_FILENAME_1 \
<boost/fusion/functional/adapter/detail/pow2_explode.hpp>
#define BOOST_PP_ITERATION_LIMITS \
(1,BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY)
#define N BOOST_PP_ITERATION_1
#include BOOST_PP_ITERATE()
#undef N
#undef BOOST_FUSION_CODE
};
}}
namespace boost
{
template<class F>
struct result_of<boost::fusion::unfused_generic<F> const ()>
{
typedef typename boost::fusion::unfused_generic<F>::call_const_0_result type;
};
template<class F>
struct result_of<boost::fusion::unfused_generic<F>()>
{
typedef typename boost::fusion::unfused_generic<F>::call_0_result type;
};
}
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_GENERIC_HPP_INCLUDED
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/functional/adapter/detail/pt_def.hpp>
#if BOOST_PP_SLOT_1() == 0
template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
struct result
< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
: boost::result_of<function_c(
BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
typename detail::gref<T,>::type BOOST_PP_INTERCEPT) > & )>
{ };
template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
struct result
< Self(BOOST_PP_ENUM_PARAMS(N,T)) >
: boost::result_of<function(
BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
typename detail::gref<T,>::type BOOST_PP_INTERCEPT) > & )>
{ };
#endif
#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1400))
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
inline typename boost::result_of<function_c(
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)> & )>::type
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a)) const
{
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>
arg(BOOST_PP_ENUM_PARAMS(N,a));
return this->fnc_transformed(arg);
}
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
inline typename boost::result_of<function(
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)> & )>::type
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a))
{
BOOST_PP_CAT(fusion::vector,N)<BOOST_PP_ENUM_PARAMS(N,PT)>
arg(BOOST_PP_ENUM_PARAMS(N,a));
return this->fnc_transformed(arg);
}
#else
BOOST_FUSION_CODE(BOOST_PP_ENUM_PARAMS(N,typename T),
BOOST_PP_ENUM_PARAMS(N,PT), BOOST_PP_ENUM_BINARY_PARAMS(N,PT,a),
BOOST_PP_ENUM_PARAMS(N,a) )
// ...generates uglier code but is faster - it caches ENUM_*
#endif
#include <boost/fusion/functional/adapter/detail/pt_undef.hpp>
#endif // defined(BOOST_PP_IS_ITERATING)
#endif

View File

@ -1,136 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_LVALUE_ARGS_HPP_INCLUDED)
#if !defined(BOOST_PP_IS_ITERATING)
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/facilities/intercept.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/fusion/sequence/container/vector/vector.hpp>
#include <boost/fusion/functional/adapter/limits.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
namespace boost { namespace fusion
{
template <class Function> class unfused_lvalue_args;
//----- ---- --- -- - - - -
template <class Function> class unfused_lvalue_args
{
Function fnc_transformed;
typedef typename detail::qf_c<Function>::type function_c;
typedef typename detail::qf<Function>::type function;
typedef typename detail::call_param<Function>::type func_const_fwd_t;
public:
inline explicit unfused_lvalue_args(func_const_fwd_t f = function())
: fnc_transformed(f)
{ }
template <typename Sig>
struct result;
typedef typename boost::result_of<
function_c(fusion::vector0 &) >::type call_const_0_result;
inline call_const_0_result operator()() const
{
fusion::vector0 arg;
return this->fnc_transformed(arg);
}
typedef typename boost::result_of<
function(fusion::vector0 &) >::type call_0_result;
inline call_0_result operator()()
{
fusion::vector0 arg;
return this->fnc_transformed(arg);
}
#define BOOST_PP_FILENAME_1 \
<boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
#define BOOST_PP_ITERATION_LIMITS \
(1,BOOST_FUSION_UNFUSED_LVALUE_ARGS_MAX_ARITY)
#include BOOST_PP_ITERATE()
};
}}
namespace boost
{
template<class F>
struct result_of< boost::fusion::unfused_lvalue_args<F> const () >
{
typedef typename boost::fusion::unfused_lvalue_args<F>::call_const_0_result type;
};
template<class F>
struct result_of< boost::fusion::unfused_lvalue_args<F>() >
{
typedef typename boost::fusion::unfused_lvalue_args<F>::call_0_result type;
};
}
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_LVALUE_ARGS_HPP_INCLUDED
#else // defined(BOOST_PP_IS_ITERATING)
////////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
////////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
: boost::result_of< function_c(
BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
typename detail::mref<T,>::type BOOST_PP_INTERCEPT) > & )>
{ };
template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
struct result< Self(BOOST_PP_ENUM_PARAMS(N,T)) >
: boost::result_of< function(
BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
typename detail::mref<T,>::type BOOST_PP_INTERCEPT) > & )>
{ };
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
inline typename boost::result_of<function_c(BOOST_PP_CAT(fusion::vector,N)
<BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)> & )>::type
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const
{
BOOST_PP_CAT(fusion::vector,N)<
BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) >
arg(BOOST_PP_ENUM_PARAMS(N,a));
return this->fnc_transformed(arg);
}
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
inline typename boost::result_of<function(BOOST_PP_CAT(fusion::vector,N)
<BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)> & )>::type
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a))
{
BOOST_PP_CAT(fusion::vector,N)<
BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) >
arg(BOOST_PP_ENUM_PARAMS(N,a));
return this->fnc_transformed(arg);
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)
#endif

View File

@ -1,137 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_RVALUE_ARGS_HPP_INCLUDED)
#if !defined(BOOST_PP_IS_ITERATING)
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/facilities/intercept.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/fusion/sequence/container/vector/vector.hpp>
#include <boost/fusion/functional/adapter/limits.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
namespace boost { namespace fusion
{
template <class Function> class unfused_rvalue_args;
//----- ---- --- -- - - - -
template <class Function> class unfused_rvalue_args
{
Function fnc_transformed;
typedef typename detail::qf_c<Function>::type function_c;
typedef typename detail::qf<Function>::type function;
typedef typename detail::call_param<Function>::type func_const_fwd_t;
public:
inline explicit unfused_rvalue_args(func_const_fwd_t f = function())
: fnc_transformed(f)
{ }
template <typename Sig>
struct result;
typedef typename boost::result_of<
function_c(fusion::vector0 &) >::type call_const_0_result;
inline call_const_0_result operator()() const
{
fusion::vector0 arg;
return this->fnc_transformed(arg);
}
typedef typename boost::result_of<
function(fusion::vector0 &) >::type call_0_result;
inline call_0_result operator()()
{
fusion::vector0 arg;
return this->fnc_transformed(arg);
}
#define BOOST_PP_FILENAME_1 \
<boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
#define BOOST_PP_ITERATION_LIMITS \
(1,BOOST_FUSION_UNFUSED_RVALUE_ARGS_MAX_ARITY)
#include BOOST_PP_ITERATE()
};
}}
namespace boost
{
template<class F>
struct result_of<boost::fusion::unfused_rvalue_args<F> const ()>
{
typedef typename boost::fusion::unfused_rvalue_args<F>::call_const_0_result type;
};
template<class F>
struct result_of<boost::fusion::unfused_rvalue_args<F>()>
{
typedef typename boost::fusion::unfused_rvalue_args<F>::call_0_result type;
};
}
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_RVALUE_ARGS_HPP_INCLUDED
#else // defined(BOOST_PP_IS_ITERATING)
////////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
////////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
: boost::result_of< function_c(
BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
typename detail::cref<T,>::type BOOST_PP_INTERCEPT) > & )>
{ };
template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
struct result< Self (BOOST_PP_ENUM_PARAMS(N,T)) >
: boost::result_of< function(
BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
typename detail::cref<T,>::type BOOST_PP_INTERCEPT) > & )>
{ };
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
inline typename boost::result_of<function_c(BOOST_PP_CAT(fusion::vector,N)
<BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& BOOST_PP_INTERCEPT)> & )>::type
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a)) const
{
BOOST_PP_CAT(fusion::vector,N)<
BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& BOOST_PP_INTERCEPT) >
arg(BOOST_PP_ENUM_PARAMS(N,a));
return this->fnc_transformed(arg);
}
template <BOOST_PP_ENUM_PARAMS(N,typename T)>
inline typename boost::result_of<function(BOOST_PP_CAT(fusion::vector,N)
<BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& BOOST_PP_INTERCEPT)> & )>::type
operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& a))
{
BOOST_PP_CAT(fusion::vector,N)<
BOOST_PP_ENUM_BINARY_PARAMS(N,T,const& BOOST_PP_INTERCEPT) >
arg(BOOST_PP_ENUM_PARAMS(N,a));
return this->fnc_transformed(arg);
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)
#endif

View File

@ -1,155 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP_INCLUDED)
#if !defined(BOOST_PP_IS_ITERATING)
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
#include <boost/config.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/container/vector/vector.hpp>
#include <boost/fusion/sequence/conversion/as_vector.hpp>
#include <boost/fusion/functional/adapter/limits.hpp>
#include <boost/fusion/functional/adapter/detail/access.hpp>
namespace boost { namespace fusion
{
template <class Function, class Sequence> class unfused_typed;
//----- ---- --- -- - - - -
namespace detail
{
template <class Derived, class Function,
class Sequence, long Arity>
struct unfused_typed_impl;
}
template <class Function, class Sequence>
class unfused_typed
: public detail::unfused_typed_impl
< unfused_typed<Function,Sequence>, Function, Sequence,
result_of::size<Sequence>::value >
{
Function fnc_transformed;
template <class D, class F, class S, long A>
friend struct detail::unfused_typed_impl;
typedef typename detail::call_param<Function>::type func_const_fwd_t;
public:
inline explicit unfused_typed(func_const_fwd_t f = Function())
: fnc_transformed(f)
{ }
};
#define BOOST_PP_FILENAME_1 <boost/fusion/functional/adapter/unfused_typed.hpp>
#define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY)
#include BOOST_PP_ITERATE()
}}
namespace boost
{
template<class F, class Seq>
struct result_of< boost::fusion::unfused_typed<F,Seq> const () >
: boost::fusion::unfused_typed<F,Seq>::template result<
boost::fusion::unfused_typed<F,Seq> const () >
{ };
template<class F, class Seq>
struct result_of< boost::fusion::unfused_typed<F,Seq>() >
: boost::fusion::unfused_typed<F,Seq>::template result<
boost::fusion::unfused_typed<F,Seq> () >
{ };
}
#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP_INCLUDED
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace detail
{
template <class Derived, class Function, class Sequence>
struct unfused_typed_impl<Derived,Function,Sequence,N>
{
typedef typename detail::qf_c<Function>::type function_c;
typedef typename detail::qf<Function>::type function;
typedef typename result_of::as_vector<Sequence>::type arg_vector_t;
public:
#define M(z,i,s) \
typename call_param<typename result_of::value_at_c<s,i>::type>::type a##i
inline typename boost::result_of<
function_c(arg_vector_t &) >::type
operator()(BOOST_PP_ENUM(N,M,arg_vector_t)) const
{
#if N > 0
arg_vector_t arg(BOOST_PP_ENUM_PARAMS(N,a));
#else
arg_vector_t arg;
#endif
return static_cast<Derived const *>(this)->fnc_transformed(arg);
}
inline typename boost::result_of<
function(arg_vector_t &) >::type
operator()(BOOST_PP_ENUM(N,M,arg_vector_t))
{
#if N > 0
arg_vector_t arg(BOOST_PP_ENUM_PARAMS(N,a));
#else
arg_vector_t arg;
#endif
return static_cast<Derived *>(this)->fnc_transformed(arg);
}
#undef M
template <typename Sig> struct result { typedef void type; };
template <class Self BOOST_PP_ENUM_TRAILING_PARAMS(N,typename T)>
struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
: boost::result_of< function_c(arg_vector_t &) >
{ };
template <class Self BOOST_PP_ENUM_TRAILING_PARAMS(N,typename T)>
struct result< Self (BOOST_PP_ENUM_PARAMS(N,T)) >
: boost::result_of< function(arg_vector_t &) >
{ };
};
} // namespace detail
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)
#endif

View File

@ -1,19 +0,0 @@
/*=============================================================================
Copyright (c) 2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_GENERATION_HPP_INCLUDED
#include <boost/fusion/functional/generation/make_fused.hpp>
#include <boost/fusion/functional/generation/make_fused_procedure.hpp>
#include <boost/fusion/functional/generation/make_fused_function_object.hpp>
#include <boost/fusion/functional/generation/make_unfused_generic.hpp>
#include <boost/fusion/functional/generation/make_unfused_lvalue_args.hpp>
#include <boost/fusion/functional/generation/make_unfused_rvalue_args.hpp>
#endif

View File

@ -1,44 +0,0 @@
/*=============================================================================
Copyright (c) 2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
// No include guard - this file is included multiple times intentionally.
#include <boost/preprocessor/cat.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#if !defined(BOOST_FUSION_CLASS_TPL_NAME)
# error "BOOST_FUSION_CLASS_TPL_NAME undefined"
#endif
#define BOOST_FUSION_FUNC_NAME BOOST_PP_CAT(make_,BOOST_FUSION_CLASS_TPL_NAME)
namespace boost { namespace fusion
{
namespace result_of
{
template <typename F>
struct BOOST_FUSION_FUNC_NAME
{
typedef fusion::BOOST_FUSION_CLASS_TPL_NAME<
typename fusion::detail::as_fusion_element<F>::type > type;
};
}
template <typename F>
inline typename result_of::BOOST_FUSION_FUNC_NAME<F>::type
BOOST_FUSION_FUNC_NAME(F const & f)
{
return typename result_of::BOOST_FUSION_FUNC_NAME<F>::type(f);
}
}}
#undef BOOST_FUSION_CLASS_TPL_NAME
#undef BOOST_FUSION_FUNC_NAME

View File

@ -1,18 +0,0 @@
/*=============================================================================
Copyright (c) 2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP_INCLUDED
#include <boost/fusion/functional/adapter/fused.hpp>
#define BOOST_FUSION_CLASS_TPL_NAME fused
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
#endif

View File

@ -1,18 +0,0 @@
/*=============================================================================
Copyright (c) 2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP_INCLUDED
#include <boost/fusion/functional/adapter/fused_function_object.hpp>
#define BOOST_FUSION_CLASS_TPL_NAME fused_function_object
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
#endif

View File

@ -1,18 +0,0 @@
/*=============================================================================
Copyright (c) 2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP_INCLUDED
#include <boost/fusion/functional/adapter/fused_procedure.hpp>
#define BOOST_FUSION_CLASS_TPL_NAME fused_procedure
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
#endif

View File

@ -1,18 +0,0 @@
/*=============================================================================
Copyright (c) 2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_GENERIC_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_GENERIC_HPP_INCLUDED
#include <boost/fusion/functional/adapter/unfused_generic.hpp>
#define BOOST_FUSION_CLASS_TPL_NAME unfused_generic
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
#endif

View File

@ -1,18 +0,0 @@
/*=============================================================================
Copyright (c) 2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_LVALUE_ARGS_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_LVALUE_ARGS_HPP_INCLUDED
#include <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
#define BOOST_FUSION_CLASS_TPL_NAME unfused_lvalue_args
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
#endif

View File

@ -1,18 +0,0 @@
/*=============================================================================
Copyright (c) 2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_RVALUE_ARGS_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_RVALUE_ARGS_HPP_INCLUDED
#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
#define BOOST_FUSION_CLASS_TPL_NAME unfused_rvalue_args
#include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
#endif

View File

@ -1,16 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_INVOCATION_HPP_INCLUDED
#include <boost/fusion/functional/invocation/invoke.hpp>
#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
#endif

View File

@ -1,87 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_THAT_PTR_HPP_INCLUDED)
#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_THAT_PTR_HPP_INCLUDED
#include <boost/get_pointer.hpp>
#include <boost/utility/addressof.hpp>
#include <boost/type_traits/config.hpp>
#include <boost/type_traits/remove_reference.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename Wanted>
struct that_ptr
{
private:
typedef typename remove_reference<Wanted>::type pointee;
template <typename T>
static inline pointee * do_get_pointer(T &, pointee * x)
{
return x;
}
template <typename T>
static inline pointee * do_get_pointer(T & x, void const *)
{
return get_pointer(x);
}
public:
static inline pointee * get(pointee * x)
{
return x;
}
static inline pointee * get(pointee & x)
{
return boost::addressof(x);
}
template <typename T> static inline pointee * get(T & x)
{
return do_get_pointer(x, boost::addressof(x));
}
};
template <typename PtrOrSmartPtr> struct non_const_pointee;
namespace adl_barrier
{
using boost::get_pointer;
void const * BOOST_TT_DECL get_pointer(...); // fallback
template< typename T> char const_tester(T *);
template< typename T> long const_tester(T const *);
template <typename Ptr>
struct non_const_pointee_impl
{
static Ptr & what;
static bool const value =
sizeof(const_tester(get_pointer(what))) == 1;
};
}
template <typename PtrOrSmartPtr> struct non_const_pointee
: adl_barrier::non_const_pointee_impl<
typename remove_cv<
typename remove_reference<PtrOrSmartPtr>::type >::type >
{
typedef non_const_pointee type;
typedef bool value_type;
};
}}}
#endif

View File

@ -1,306 +0,0 @@
/*=============================================================================
Copyright (c) 2005-2006 João Abecasis
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP_INCLUDED)
#if !defined(BOOST_PP_IS_ITERATING)
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/arithmetic/dec.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/repetition/enum_shifted.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/front.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/remove_cv.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/function_types/is_function.hpp>
#include <boost/function_types/is_callable_builtin.hpp>
#include <boost/function_types/is_member_pointer.hpp>
#include <boost/function_types/is_member_function_pointer.hpp>
#include <boost/function_types/result_type.hpp>
#include <boost/function_types/parameter_types.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/intrinsic/front.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/functional/invocation/limits.hpp>
#include <boost/fusion/functional/invocation/detail/that_ptr.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Function, class Sequence> struct invoke;
}
template <typename Function, class Sequence>
inline typename result_of::invoke<Function, Sequence>::type
invoke(Function, Sequence &);
template <typename Function, class Sequence>
inline typename result_of::invoke<Function, Sequence const>::type
invoke(Function, Sequence const &);
//----- ---- --- -- - - - -
namespace detail
{
namespace ft = function_types;
template<
typename Function, class Sequence,
int N = result_of::size<Sequence>::value,
bool CBI = ft::is_callable_builtin<Function>::value,
bool RandomAccess = traits::is_random_access<Sequence>::value
>
struct invoke_impl;
template <class Sequence, int N>
struct invoke_param_types;
template <typename T, class Sequence>
struct invoke_data_member;
template <typename Function, class Sequence, int N, bool RandomAccess>
struct invoke_mem_fn;
#define BOOST_PP_FILENAME_1 <boost/fusion/functional/invocation/invoke.hpp>
#define BOOST_PP_ITERATION_LIMITS (0, BOOST_FUSION_INVOKE_MAX_ARITY)
#include BOOST_PP_ITERATE()
template <typename F, class Sequence, int N, bool RandomAccess>
struct invoke_nonmember_builtin
// use same implementation as for function objects but...
: invoke_impl< // ...work around boost::result_of bugs
typename mpl::eval_if< ft::is_function<F>,
boost::add_reference<F>, boost::remove_cv<F> >::type,
Sequence, N, false, RandomAccess >
{ };
template <typename Function, class Sequence, int N, bool RandomAccess>
struct invoke_impl<Function,Sequence,N,true,RandomAccess>
: mpl::if_< ft::is_member_function_pointer<Function>,
invoke_mem_fn<Function,Sequence,N,RandomAccess>,
invoke_nonmember_builtin<Function,Sequence,N,RandomAccess>
>::type
{ };
template <typename Function, class Sequence, bool RandomAccess>
struct invoke_impl<Function,Sequence,1,true,RandomAccess>
: mpl::eval_if< ft::is_member_pointer<Function>,
mpl::if_< ft::is_member_function_pointer<Function>,
invoke_mem_fn<Function,Sequence,1,RandomAccess>,
invoke_data_member<Function, Sequence> >,
mpl::identity< invoke_nonmember_builtin<
Function,Sequence,1,RandomAccess> >
>::type
{ };
template <typename T, class C, class Sequence>
struct invoke_data_member< T C::*, Sequence >
{
private:
typedef typename result_of::front<Sequence>::type that;
typedef mpl::or_< boost::is_convertible<that,C*>,
boost::is_convertible<that,C&>,
non_const_pointee<that> > non_const_cond;
typedef typename mpl::eval_if< non_const_cond,
mpl::identity<C>, add_const<C> >::type qualified_class;
typedef typename mpl::eval_if< non_const_cond,
mpl::identity<T>, add_const<T> >::type qualified_type;
public:
typedef typename boost::add_reference<qualified_type>::type
result_type;
static inline result_type call(T C::* f, Sequence & s)
{
typename result_of::front<Sequence>::type c = fusion::front(s);
return that_ptr<qualified_class>::get(c)->*f;
}
};
}
namespace result_of
{
template <typename Function, class Sequence> struct invoke
{
typedef typename detail::invoke_impl<
typename boost::remove_reference<Function>::type, Sequence
>::result_type type;
};
}
template <typename Function, class Sequence>
inline typename result_of::invoke<Function,Sequence>::type
invoke(Function f, Sequence & s)
{
return detail::invoke_impl<
typename boost::remove_reference<Function>::type,Sequence
>::call(f,s);
}
template <typename Function, class Sequence>
inline typename result_of::invoke<Function,Sequence const>::type
invoke(Function f, Sequence const & s)
{
return detail::invoke_impl<
typename boost::remove_reference<Function>::type,Sequence const
>::call(f,s);
}
}}
#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP_INCLUDED
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
template <typename Function, class Sequence>
struct invoke_impl<Function,Sequence,N,false,true>
{
public:
typedef typename boost::result_of<
#define M(z,j,data) typename result_of::at_c<Sequence,j>::type
Function(BOOST_PP_ENUM(N,M,~)) >::type result_type;
#undef M
template <typename F>
static inline result_type
call(F & f, Sequence & s)
{
#define M(z,j,data) fusion::at_c<j>(s)
return f( BOOST_PP_ENUM(N,M,~) );
}
};
#if N > 0
template <typename Function, class Sequence>
struct invoke_mem_fn<Function,Sequence,N,true>
{
public:
typedef typename ft::result_type<Function>::type result_type;
template <typename F>
static inline result_type
call(F & f, Sequence & s)
{
return (that_ptr<typename mpl::front<
ft::parameter_types<Function> >::type
>::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~));
}
};
#endif
#undef M
#define M(z,j,data) \
typename seq::I##j i##j = \
fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
template <typename Function, class Sequence>
struct invoke_impl<Function,Sequence,N,false,false>
{
private:
typedef invoke_param_types<Sequence,N> seq;
public:
typedef typename boost::result_of<
Function(BOOST_PP_ENUM_PARAMS(N,typename seq::T))
>::type result_type;
template <typename F>
static inline result_type
call(F & f, Sequence & s)
{
#if N > 0
typename seq::I0 i0 = fusion::begin(s);
BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
#endif
return f( BOOST_PP_ENUM_PARAMS(N,*i) );
}
};
#if N > 0
template <typename Function, class Sequence>
struct invoke_mem_fn<Function,Sequence,N,false>
{
private:
typedef invoke_param_types<Sequence,N> seq;
public:
typedef typename ft::result_type<Function>::type result_type;
template <typename F>
static inline result_type
call(F & f, Sequence & s)
{
typename seq::I0 i0 = fusion::begin(s);
BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
return (that_ptr< typename mpl::front<
ft::parameter_types<Function> >::type
>::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i));
}
};
#endif
#undef M
template <class Sequence> struct invoke_param_types<Sequence,N>
{
#if N > 0
typedef typename result_of::begin<Sequence>::type I0;
typedef typename result_of::deref<I0>::type T0;
#define M(z,i,data) \
typedef typename result_of::next< \
BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i; \
typedef typename result_of::deref<I##i>::type T##i;
BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
#undef M
#endif
};
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)
#endif

View File

@ -1,178 +0,0 @@
/*=============================================================================
Copyright (c) 2005-2006 João Abecasis
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP_INCLUDED)
#if !defined(BOOST_PP_IS_ITERATING)
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/arithmetic/dec.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/functional/invocation/limits.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <class Function, class Sequence> struct invoke_function_object;
}
template <class Function, class Sequence>
inline typename result_of::invoke_function_object<Function, Sequence>::type
invoke_function_object(Function, Sequence &);
template <class Function, class Sequence>
inline typename result_of::invoke_function_object<Function, Sequence const
>::type invoke_function_object(Function, Sequence const &);
//----- ---- --- -- - - - -
namespace detail
{
template<
class Function, class Sequence,
int N = result_of::size<Sequence>::value,
bool RandomAccess = traits::is_random_access<Sequence>::value
>
struct invoke_function_object_impl;
template <class Sequence, int N>
struct invoke_function_object_param_types;
#define BOOST_PP_FILENAME_1 \
<boost/fusion/functional/invocation/invoke_function_object.hpp>
#define BOOST_PP_ITERATION_LIMITS \
(0, BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY)
#include BOOST_PP_ITERATE()
}
namespace result_of
{
template <class Function, class Sequence> struct invoke_function_object
{
typedef typename detail::invoke_function_object_impl<
typename boost::remove_reference<Function>::type, Sequence
>::result_type type;
};
}
template <class Function, class Sequence>
inline typename result_of::invoke_function_object<Function,Sequence>::type
invoke_function_object(Function f, Sequence & s)
{
return detail::invoke_function_object_impl<
typename boost::remove_reference<Function>::type,Sequence
>::call(f,s);
}
template <class Function, class Sequence>
inline typename result_of::invoke_function_object<Function,Sequence const>::type
invoke_function_object(Function f, Sequence const & s)
{
return detail::invoke_function_object_impl<
typename boost::remove_reference<Function>::type,Sequence const
>::call(f,s);
}
}}
#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP_INCLUDED
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
template <class Function, class Sequence>
struct invoke_function_object_impl<Function,Sequence,N,true>
{
public:
typedef typename boost::result_of<
#define M(z,j,data) \
typename boost::remove_reference< \
typename result_of::at_c<Sequence,j>::type >::type
Function (BOOST_PP_ENUM(N,M,~)) >::type result_type;
#undef M
template <class F>
static inline result_type
call(F & f, Sequence & s)
{
#define M(z,j,data) fusion::at_c<j>(s)
return f( BOOST_PP_ENUM(N,M,~) );
#undef M
}
};
template <class Function, class Sequence>
struct invoke_function_object_impl<Function,Sequence,N,false>
{
private:
typedef invoke_function_object_param_types<Sequence,N> seq;
public:
typedef typename boost::result_of<
Function (BOOST_PP_ENUM_PARAMS(N,typename seq::T))
>::type result_type;
template <class F>
static inline result_type
call(F & f, Sequence & s)
{
#if N > 0
typename seq::I0 i0 = fusion::begin(s);
#define M(z,j,data) \
typename seq::I##j i##j = \
fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
#undef M
#endif
return f( BOOST_PP_ENUM_PARAMS(N,*i) );
}
};
template <class Sequence>
struct invoke_function_object_param_types<Sequence,N>
{
#if N > 0
typedef typename result_of::begin<Sequence>::type I0;
typedef typename result_of::deref<I0>::type T0;
#define M(z,i,data) \
typedef typename result_of::next< \
BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i; \
typedef typename result_of::deref<I##i>::type T##i;
BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
#undef M
#endif
};
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)
#endif

View File

@ -1,171 +0,0 @@
/*=============================================================================
Copyright (c) 2005-2006 João Abecasis
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP_INCLUDED)
#if !defined(BOOST_PP_IS_ITERATING)
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/arithmetic/dec.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/preprocessor/repetition/enum_shifted.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/mpl/front.hpp>
#include <boost/function_types/is_callable_builtin.hpp>
#include <boost/function_types/is_member_function_pointer.hpp>
#include <boost/function_types/parameter_types.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/functional/invocation/limits.hpp>
#include <boost/fusion/functional/invocation/detail/that_ptr.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Function, class Sequence> struct invoke_procedure
{
typedef void type;
};
}
template <typename Function, class Sequence>
inline void invoke_procedure(Function, Sequence &);
template <typename Function, class Sequence>
inline void invoke_procedure(Function, Sequence const &);
//----- ---- --- -- - - - -
namespace detail
{
namespace ft = function_types;
template<
typename Function, class Sequence,
int N = result_of::size<Sequence>::value,
bool MFP = ft::is_member_function_pointer<Function>::value,
bool RandomAccess = traits::is_random_access<Sequence>::value
>
struct invoke_procedure_impl;
#define BOOST_PP_FILENAME_1 \
<boost/fusion/functional/invocation/invoke_procedure.hpp>
#define BOOST_PP_ITERATION_LIMITS \
(0, BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY)
#include BOOST_PP_ITERATE()
}
template <typename Function, class Sequence>
inline void invoke_procedure(Function f, Sequence & s)
{
detail::invoke_procedure_impl<
typename boost::remove_reference<Function>::type,Sequence
>::call(f,s);
}
template <typename Function, class Sequence>
inline void invoke_procedure(Function f, Sequence const & s)
{
detail::invoke_procedure_impl<
typename boost::remove_reference<Function>::type,Sequence const
>::call(f,s);
}
}}
#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP_INCLUDED
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
#define M(z,j,data) fusion::at_c<j>(s)
template <typename Function, class Sequence>
struct invoke_procedure_impl<Function,Sequence,N,false,true>
{
static inline void call(Function & f, Sequence & s)
{
f(BOOST_PP_ENUM(N,M,~));
}
};
#if N > 0
template <typename Function, class Sequence>
struct invoke_procedure_impl<Function,Sequence,N,true,true>
{
static inline void call(Function & f, Sequence & s)
{
(that_ptr<typename mpl::front<
ft::parameter_types<Function> >::type
>::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~));
}
};
#endif
#undef M
#define M(z,j,data) \
typedef typename result_of::next< BOOST_PP_CAT(I,BOOST_PP_DEC(j)) \
>::type I ## j ; \
I##j i##j = fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
template <typename Function, class Sequence>
struct invoke_procedure_impl<Function,Sequence,N,false,false>
{
static inline void call(Function & f, Sequence & s)
{
#if N > 0
typedef typename result_of::begin<Sequence>::type I0;
I0 i0 = fusion::begin(s);
BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
#endif
f( BOOST_PP_ENUM_PARAMS(N,*i) );
}
};
#if N > 0
template <typename Function, class Sequence>
struct invoke_procedure_impl<Function,Sequence,N,true,false>
{
static inline void call(Function & f, Sequence & s)
{
typedef typename result_of::begin<Sequence>::type I0;
I0 i0 = fusion::begin(s);
BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
(that_ptr<typename mpl::front<
ft::parameter_types<Function> >::type
>::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i));
}
};
#endif
#undef M
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)
#endif

View File

@ -1,23 +0,0 @@
/*=============================================================================
Copyright (c) 2006-2007 Tobias Schwinger
Use modification and distribution are subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt).
==============================================================================*/
#if !defined(BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP_INCLUDED)
# define BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP_INCLUDED
# if !defined(BOOST_FUSION_INVOKE_MAX_ARITY)
# define BOOST_FUSION_INVOKE_MAX_ARITY 6
# endif
# if !defined(BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY)
# define BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY 6
# endif
# if !defined(BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY)
# define BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY 6
# endif
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_ADAPT_STRUCT)
#define FUSION_INCLUDE_ADAPT_STRUCT
#include <boost/fusion/sequence/adapted/struct/adapt_struct.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_ANY)
#define FUSION_INCLUDE_ANY
#include <boost/fusion/algorithm/query/any.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_AS_VECTOR)
#define FUSION_INCLUDE_AS_VECTOR
#include <boost/fusion/sequence/conversion/as_vector.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_AT)
#define FUSION_INCLUDE_AT
#include <boost/fusion/sequence/intrinsic/at.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_BEGIN)
#define FUSION_INCLUDE_BEGIN
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_DEREF)
#define FUSION_INCLUDE_DEREF
#include <boost/fusion/iterator/deref.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_BEGIN)
#define FUSION_INCLUDE_BEGIN
#include <boost/fusion/sequence/intrinsic/end.hpp>
#endif

View File

@ -1,13 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_EQUAL_TO)
#define FUSION_INCLUDE_EQUAL_TO
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/sequence/comparison/equal_to.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_FILTER_IF)
#define FUSION_INCLUDE_FILTER_IF
#include <boost/fusion/algorithm/transformation/filter_if.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_FOR_EACH)
#define FUSION_INCLUDE_FOR_EACH
#include <boost/fusion/algorithm/iteration/for_each.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Hartmut Kaiser
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_IO)
#define FUSION_INCLUDE_IO
#include <boost/fusion/sequence/io.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_IS_SEQUENCE)
#define FUSION_INCLUDE_IS_SEQUENCE
#include <boost/fusion/support/is_sequence.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_JOIN)
#define FUSION_INCLUDE_JOIN
#include <boost/fusion/algorithm/transformation/join.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_JOINT_VIEW)
#define FUSION_INCLUDE_JOINT_VIEW
#include <boost/fusion/sequence/view/joint_view.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_LIST)
#define FUSION_INCLUDE_LIST
#include <boost/fusion/sequence/container/list/list.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_MAKE_CONS)
#define FUSION_INCLUDE_MAKE_CONS
#include <boost/fusion/sequence/generation/make_cons.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_MAKE_VECTOR)
#define FUSION_INCLUDE_MAKE_VECTOR
#include <boost/fusion/sequence/generation/make_vector.hpp>
#endif

View File

@ -1,13 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_MPL)
#define FUSION_INCLUDE_MPL
#include <boost/fusion/sequence/adapted/mpl.hpp>
#include <boost/fusion/sequence/intrinsic/mpl.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_NEXT)
#define FUSION_INCLUDE_NEXT
#include <boost/fusion/iterator/next.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_PUSH_FRONT)
#define FUSION_INCLUDE_PUSH_FRONT
#include <boost/fusion/algorithm/transformation/push_front.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_SINGLE_VIEW)
#define FUSION_INCLUDE_SINGLE_VIEW
#include <boost/fusion/sequence/view/single_view.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_STD_PAIR)
#define FUSION_INCLUDE_STD_PAIR
#include <boost/fusion/sequence/adapted/std_pair.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_SWAP)
#define FUSION_INCLUDE_SWAP
#include <boost/fusion/sequence/intrinsic/swap.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_TRANSFORM)
#define FUSION_INCLUDE_TRANSFORM
#include <boost/fusion/algorithm/transformation/transform.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_TRANSFORM_VIEW)
#define FUSION_INCLUDE_TRANSFORM_VIEW
#include <boost/fusion/sequence/view/transform_view.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Hartmut Kaiser
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_VALUE_AT)
#define FUSION_INCLUDE_VALUE_AT
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
#endif

View File

@ -1,12 +0,0 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_VALUE_OF)
#define FUSION_INCLUDE_VALUE_OF
#include <boost/fusion/iterator/value_of.hpp>
#endif

Some files were not shown because too many files have changed in this diff Show More