stabilize build system: depends, installer, boost/bdb fixes, cross targets groundwork

This commit is contained in:
2026-02-24 18:38:47 +00:00
parent da8c28aaeb
commit 65cb2619a7
13106 changed files with 2484322 additions and 1804 deletions
@@ -0,0 +1,65 @@
/*=============================================================================
Copyright (c) 2001-2011 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_ACCESS_04182005_0737)
#define FUSION_ACCESS_04182005_0737
#include <boost/fusion/support/config.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename T>
struct ref_result
{
typedef typename add_reference<T>::type type;
};
template <typename T>
struct cref_result
{
typedef typename
add_reference<
typename add_const<T>::type
>::type
type;
};
template <typename T>
struct call_param
{
typedef T const& type;
};
template <typename T>
struct call_param<T&>
{
typedef T& type;
};
template <typename T>
struct call_param<T const>
{
typedef T const& type;
};
template <typename T>
struct call_param<T volatile>
{
typedef T const& type;
};
template <typename T>
struct call_param<T const volatile>
{
typedef T const& type;
};
}}}
#endif
@@ -0,0 +1,39 @@
/*=============================================================================
Copyright (c) 2016 Lee Clagett
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 FUSION_AND_07152016_1625
#define FUSION_AND_07152016_1625
#include <boost/config.hpp>
#include <boost/type_traits/integral_constant.hpp>
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#error fusion::detail::and_ requires variadic templates
#endif
namespace boost { namespace fusion { namespace detail {
template<typename ...Cond>
struct and_impl : false_type {};
template<typename ...T>
struct and_impl<integral_constant<T, true>...> : true_type {};
// This specialization is necessary to avoid MSVC-12 variadics bug.
template<bool ...Cond>
struct and_impl1 : and_impl<integral_constant<bool, Cond>...> {};
/* fusion::detail::and_ differs from mpl::and_ in the following ways:
- The empty set is valid and returns true
- A single element set is valid and returns the identity
- There is no upper bound on the set size
- The conditions are evaluated at once, and are not short-circuited. This
reduces instantations when returning true; the implementation is not
recursive. */
template<typename ...Cond>
struct and_ : and_impl1<Cond::value...> {};
}}}
#endif // FUSION_AND_07152016_1625
@@ -0,0 +1,60 @@
/*=============================================================================
Copyright (c) 1999-2003 Jaakko Jarvi
Copyright (c) 2001-2011 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_AS_FUSION_ELEMENT_05052005_0338)
#define FUSION_AS_FUSION_ELEMENT_05052005_0338
#include <boost/fusion/support/config.hpp>
#include <boost/ref.hpp>
#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
#include <functional>
#endif
namespace boost { namespace fusion { namespace detail
{
template <typename T>
struct as_fusion_element
{
typedef T type;
};
template <typename T>
struct as_fusion_element<reference_wrapper<T> >
{
typedef T& type;
};
#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
template <typename T>
struct as_fusion_element<std::reference_wrapper<T> >
{
typedef T& type;
};
#endif
template <typename T, int N>
struct as_fusion_element<T[N]>
{
typedef const T(&type)[N];
};
template <typename T, int N>
struct as_fusion_element<volatile T[N]>
{
typedef const volatile T(&type)[N];
};
template <typename T, int N>
struct as_fusion_element<const volatile T[N]>
{
typedef const volatile T(&type)[N];
};
}}}
#endif
@@ -0,0 +1,19 @@
/*=============================================================================
Copyright (c) 2001-2011 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_CATEGORY_OF_07212005_1025)
#define FUSION_CATEGORY_OF_07212005_1025
namespace boost { namespace fusion { namespace detail
{
template <typename T>
struct fusion_category_of
{
typedef typename T::category type;
};
}}}
#endif
@@ -0,0 +1,22 @@
/*=============================================================================
Copyright (c) 2015 Kohei Takahashi
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_FUSION_SUPPORT_DETAIL_ENABLER_12102015_0346
#define BOOST_FUSION_SUPPORT_DETAIL_ENABLER_12102015_0346
#include <boost/config.hpp>
namespace boost { namespace fusion { namespace detail
{
struct enabler_ {};
BOOST_STATIC_CONSTEXPR enabler_ enabler = {};
}}}
#endif
@@ -0,0 +1,79 @@
/*=============================================================================
Copyright (c) 2015 Agustin K-ballo Berge
Copyright (c) 2015 Kohei Takahashi
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_FUSION_SUPPORT_DETAIL_INDEX_SEQUENCE_06232015_1038
#define BOOST_FUSION_SUPPORT_DETAIL_INDEX_SEQUENCE_06232015_1038
#include <boost/fusion/support/config.hpp>
#include <cstddef>
// GCC5 has O(logN) implementation, see https://gcc.gnu.org/PR66059 .
#if (defined(__cpp_lib_integer_sequence) && __cpp_lib_integer_sequence >= 201304) \
|| (defined(BOOST_LIBSTDCXX_VERSION) \
&& BOOST_LIBSTDCXX_VERSION >= 500000 && __cplusplus >= 201402)
#include <utility>
#define BOOST_FUSION_STDLIB_HAS_INTEGER_SEQUENCE
#endif
namespace boost { namespace fusion { namespace detail
{
#ifdef BOOST_FUSION_STDLIB_HAS_INTEGER_SEQUENCE
// Use aliasing templates without checking availability, the compiler should work.
template <std::size_t ...Ints>
using index_sequence = std::index_sequence<Ints...>;
template <std::size_t N>
struct make_index_sequence
{
using type = std::make_index_sequence<N>;
};
#else
template <std::size_t ...Ints>
struct index_sequence
{
typedef std::size_t value_type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static std::size_t size() BOOST_NOEXCEPT
{ return sizeof...(Ints); }
// non standard extension
typedef index_sequence type;
};
template <typename Left, typename Right>
struct _make_index_sequence_join;
template <std::size_t... Left, std::size_t... Right>
struct _make_index_sequence_join<
index_sequence<Left...>, index_sequence<Right...>
> : index_sequence<Left..., (sizeof...(Left) + Right)...>
{};
template <std::size_t N>
struct make_index_sequence
: _make_index_sequence_join<
typename make_index_sequence<N / 2>::type
, typename make_index_sequence<N - N / 2>::type
>
{};
template <>
struct make_index_sequence<1>
: index_sequence<0>
{};
template <>
struct make_index_sequence<0>
: index_sequence<>
{};
#endif
}}}
#endif
@@ -0,0 +1,28 @@
/*=============================================================================
Copyright (c) 2001-2011 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_DETAIL_IS_MPL_SEQUENCE_29122006_1105)
#define FUSION_DETAIL_IS_MPL_SEQUENCE_29122006_1105
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/mpl/is_sequence.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/not.hpp>
#include <boost/type_traits/is_convertible.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename T>
struct is_mpl_sequence
: mpl::and_<
mpl::not_<is_convertible<T, from_sequence_convertible_type> >
, mpl::is_sequence<T> >
{};
}}}
#endif
@@ -0,0 +1,29 @@
/*=============================================================================
Copyright (c) 2014-2015 Kohei Takahashi
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 FUSION_IS_SAME_SIZE_10082015_1156
#define FUSION_IS_SAME_SIZE_10082015_1156
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/core/enable_if.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/equal_to.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename Sequence1, typename Sequence2, typename = void, typename = void>
struct is_same_size : mpl::false_ {};
template <typename Sequence1, typename Sequence2>
struct is_same_size<Sequence1, Sequence2,
typename enable_if<traits::is_sequence<Sequence1> >::type,
typename enable_if<traits::is_sequence<Sequence2> >::type>
: mpl::equal_to<result_of::size<Sequence1>, result_of::size<Sequence2> >
{};
}}}
#endif
@@ -0,0 +1,19 @@
/*=============================================================================
Copyright (c) 2001-2011 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_IS_VIEW_03202006_0018)
#define FUSION_IS_VIEW_03202006_0018
namespace boost { namespace fusion { namespace detail
{
template <typename T>
struct fusion_is_view
{
typedef typename T::is_view type;
};
}}}
#endif
@@ -0,0 +1,66 @@
/*=============================================================================
Copyright (c) 2001-2011 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_MPL_ITERATOR_CATEGORY_07212005_0923)
#define FUSION_MPL_ITERATOR_CATEGORY_07212005_0923
namespace boost { namespace mpl
{
struct forward_iterator_tag;
struct bidirectional_iterator_tag;
struct random_access_iterator_tag;
}}
namespace boost { namespace fusion
{
struct forward_traversal_tag;
struct bidirectional_traversal_tag;
struct random_access_traversal_tag;
}}
namespace boost { namespace fusion { namespace detail
{
template <typename Category>
struct mpl_iterator_category;
template <>
struct mpl_iterator_category<mpl::forward_iterator_tag>
{
typedef forward_traversal_tag type;
};
template <>
struct mpl_iterator_category<mpl::bidirectional_iterator_tag>
{
typedef bidirectional_traversal_tag type;
};
template <>
struct mpl_iterator_category<mpl::random_access_iterator_tag>
{
typedef random_access_traversal_tag type;
};
template <>
struct mpl_iterator_category<forward_traversal_tag>
{
typedef forward_traversal_tag type;
};
template <>
struct mpl_iterator_category<bidirectional_traversal_tag>
{
typedef bidirectional_traversal_tag type;
};
template <>
struct mpl_iterator_category<random_access_traversal_tag>
{
typedef random_access_traversal_tag type;
};
}}}
#endif
@@ -0,0 +1,72 @@
/*=============================================================================
Copyright (c) 2011 Thomas Heller
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_BOOST_FUSION_SUPPORT_PP_ROUND_HPP
#define BOOST_BOOST_FUSION_SUPPORT_PP_ROUND_HPP
#include <boost/fusion/support/config.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/comparison/less.hpp>
#include <boost/preprocessor/control/if.hpp>
#define BOOST_FUSION_PP_ROUND_UP(N) \
BOOST_PP_CAT(BOOST_FUSION_PP_DO_ROUND_UP_, N)() \
/**/
#define BOOST_FUSION_PP_DO_ROUND_UP_0() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_1() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_2() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_3() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_4() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_5() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_6() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_7() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_8() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_9() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_10() 10
#define BOOST_FUSION_PP_DO_ROUND_UP_11() 20
#define BOOST_FUSION_PP_DO_ROUND_UP_12() 20
#define BOOST_FUSION_PP_DO_ROUND_UP_13() 20
#define BOOST_FUSION_PP_DO_ROUND_UP_14() 20
#define BOOST_FUSION_PP_DO_ROUND_UP_15() 20
#define BOOST_FUSION_PP_DO_ROUND_UP_16() 20
#define BOOST_FUSION_PP_DO_ROUND_UP_17() 20
#define BOOST_FUSION_PP_DO_ROUND_UP_18() 20
#define BOOST_FUSION_PP_DO_ROUND_UP_19() 20
#define BOOST_FUSION_PP_DO_ROUND_UP_20() 20
#define BOOST_FUSION_PP_DO_ROUND_UP_21() 30
#define BOOST_FUSION_PP_DO_ROUND_UP_22() 30
#define BOOST_FUSION_PP_DO_ROUND_UP_23() 30
#define BOOST_FUSION_PP_DO_ROUND_UP_24() 30
#define BOOST_FUSION_PP_DO_ROUND_UP_25() 30
#define BOOST_FUSION_PP_DO_ROUND_UP_26() 30
#define BOOST_FUSION_PP_DO_ROUND_UP_27() 30
#define BOOST_FUSION_PP_DO_ROUND_UP_28() 30
#define BOOST_FUSION_PP_DO_ROUND_UP_29() 30
#define BOOST_FUSION_PP_DO_ROUND_UP_30() 30
#define BOOST_FUSION_PP_DO_ROUND_UP_31() 40
#define BOOST_FUSION_PP_DO_ROUND_UP_32() 40
#define BOOST_FUSION_PP_DO_ROUND_UP_33() 40
#define BOOST_FUSION_PP_DO_ROUND_UP_34() 40
#define BOOST_FUSION_PP_DO_ROUND_UP_35() 40
#define BOOST_FUSION_PP_DO_ROUND_UP_36() 40
#define BOOST_FUSION_PP_DO_ROUND_UP_37() 40
#define BOOST_FUSION_PP_DO_ROUND_UP_38() 40
#define BOOST_FUSION_PP_DO_ROUND_UP_39() 40
#define BOOST_FUSION_PP_DO_ROUND_UP_40() 40
#define BOOST_FUSION_PP_DO_ROUND_UP_41() 50
#define BOOST_FUSION_PP_DO_ROUND_UP_42() 50
#define BOOST_FUSION_PP_DO_ROUND_UP_43() 50
#define BOOST_FUSION_PP_DO_ROUND_UP_44() 50
#define BOOST_FUSION_PP_DO_ROUND_UP_45() 50
#define BOOST_FUSION_PP_DO_ROUND_UP_46() 50
#define BOOST_FUSION_PP_DO_ROUND_UP_47() 50
#define BOOST_FUSION_PP_DO_ROUND_UP_48() 50
#define BOOST_FUSION_PP_DO_ROUND_UP_49() 50
#define BOOST_FUSION_PP_DO_ROUND_UP_50() 50
#endif
@@ -0,0 +1,401 @@
/*=============================================================================
Copyright (c) 2011 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(BOOST_FUSION_SEGMENTED_FOLD_UNTIL_IMPL_HPP_INCLUDED)
#define BOOST_FUSION_SEGMENTED_FOLD_UNTIL_IMPL_HPP_INCLUDED
#include <boost/fusion/support/config.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/remove_reference.hpp>
#include <boost/fusion/support/void.hpp>
#include <boost/fusion/container/list/cons_fwd.hpp>
#include <boost/fusion/sequence/intrinsic_fwd.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/support/is_segmented.hpp>
#include <boost/fusion/sequence/intrinsic/segments.hpp>
// fun(seq, state, context)
// seq: a non-segmented range
// state: the state of the fold so far
// context: the path to the current range
//
// returns: (state', fcontinue)
namespace boost { namespace fusion
{
template <typename First, typename Last>
struct iterator_range;
template <typename Context>
struct segmented_iterator;
namespace result_of
{
template <typename Cur, typename Context>
struct make_segmented_iterator
{
typedef
iterator_range<
Cur
, typename result_of::end<
typename remove_reference<
typename add_const<
typename result_of::deref<
typename Context::car_type::begin_type
>::type
>::type
>::type
>::type
>
range_type;
typedef
segmented_iterator<cons<range_type, Context> >
type;
};
}
template <typename Cur, typename Context>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::make_segmented_iterator<Cur, Context>::type
make_segmented_iterator(Cur const& cur, Context const& context)
{
typedef result_of::make_segmented_iterator<Cur, Context> impl_type;
typedef typename impl_type::type type;
typedef typename impl_type::range_type range_type;
return type(cons<range_type, Context>(range_type(cur, fusion::end(*context.car.first)), context));
}
namespace detail
{
template <
typename Begin
, typename End
, typename State
, typename Context
, typename Fun
, bool IsEmpty
>
struct segmented_fold_until_iterate_skip_empty;
template <
typename Begin
, typename End
, typename State
, typename Context
, typename Fun
, bool IsDone = result_of::equal_to<Begin, End>::type::value
>
struct segmented_fold_until_iterate;
template <
typename Sequence
, typename State
, typename Context
, typename Fun
, bool IsSegmented = traits::is_segmented<Sequence>::type::value
>
struct segmented_fold_until_impl;
template <typename Segments, typename State, typename Context, typename Fun>
struct segmented_fold_until_on_segments;
//auto push_context(cur, end, context)
//{
// return push_back(context, segment_sequence(iterator_range(cur, end)));
//}
template <typename Cur, typename End, typename Context>
struct push_context
{
typedef iterator_range<Cur, End> range_type;
typedef cons<range_type, Context> type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Cur const& cur, End const& end, Context const& context)
{
return cons<range_type, Context>(range_type(cur, end), context);
}
};
//auto make_segmented_iterator(cur, end, context)
//{
// return segmented_iterator(push_context(cur, end, context));
//}
//
//auto segmented_fold_until_impl(seq, state, context, fun)
//{
// if (is_segmented(seq))
// {
// segmented_fold_until_on_segments(segments(seq), state, context, fun);
// }
// else
// {
// return fun(seq, state, context);
// }
//}
template <
typename Sequence
, typename State
, typename Context
, typename Fun
, bool IsSegmented
>
struct segmented_fold_until_impl
{
typedef
segmented_fold_until_on_segments<
typename remove_reference<
typename add_const<
typename result_of::segments<Sequence>::type
>::type
>::type
, State
, Context
, Fun
>
impl;
typedef typename impl::type type;
typedef typename impl::continue_type continue_type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, State const& state, Context const& context, Fun const& fun)
{
return impl::call(fusion::segments(seq), state, context, fun);
}
};
template <
typename Sequence
, typename State
, typename Context
, typename Fun
>
struct segmented_fold_until_impl<Sequence, State, Context, Fun, false>
{
typedef
typename Fun::template apply<Sequence, State, Context>
apply_type;
typedef typename apply_type::type type;
typedef typename apply_type::continue_type continue_type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, State const& state, Context const& context, Fun const& fun)
{
return apply_type::call(seq, state, context, fun);
}
};
//auto segmented_fold_until_on_segments(segs, state, context, fun)
//{
// auto cur = begin(segs), end = end(segs);
// for (; cur != end; ++cur)
// {
// if (empty(*cur))
// continue;
// auto context` = push_context(cur, end, context);
// state = segmented_fold_until_impl(*cur, state, context`, fun);
// if (!second(state))
// return state;
// }
//}
template <typename Apply>
struct continue_wrap
{
typedef typename Apply::continue_type type;
};
template <typename Begin, typename End, typename State, typename Context, typename Fun, bool IsEmpty>
struct segmented_fold_until_iterate_skip_empty
{
// begin != end and !empty(*begin)
typedef
push_context<Begin, End, Context>
push_context_impl;
typedef
typename push_context_impl::type
next_context_type;
typedef
segmented_fold_until_impl<
typename remove_reference<
typename add_const<
typename result_of::deref<Begin>::type
>::type
>::type
, State
, next_context_type
, Fun
>
fold_recurse_impl;
typedef
typename fold_recurse_impl::type
next_state_type;
typedef
segmented_fold_until_iterate<
typename result_of::next<Begin>::type
, End
, next_state_type
, Context
, Fun
>
next_iteration_impl;
typedef
typename mpl::eval_if<
typename fold_recurse_impl::continue_type
, next_iteration_impl
, mpl::identity<next_state_type>
>::type
type;
typedef
typename mpl::eval_if<
typename fold_recurse_impl::continue_type
, continue_wrap<next_iteration_impl>
, mpl::identity<mpl::false_>
>::type
continue_type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Begin const& beg, End const& end, State const& state
, Context const& context, Fun const& fun)
{
return call(beg, end, state, context, fun, typename fold_recurse_impl::continue_type());
}
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Begin const& beg, End const& end, State const& state
, Context const& context, Fun const& fun, mpl::true_) // continue
{
return next_iteration_impl::call(
fusion::next(beg)
, end
, fold_recurse_impl::call(
*beg
, state
, push_context_impl::call(beg, end, context)
, fun)
, context
, fun);
}
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Begin const& beg, End const& end, State const& state
, Context const& context, Fun const& fun, mpl::false_) // break
{
return fold_recurse_impl::call(
*beg
, state
, push_context_impl::call(beg, end, context)
, fun);
}
};
template <typename Begin, typename End, typename State, typename Context, typename Fun>
struct segmented_fold_until_iterate_skip_empty<Begin, End, State, Context, Fun, true>
{
typedef
segmented_fold_until_iterate<
typename result_of::next<Begin>::type
, End
, State
, Context
, Fun
>
impl;
typedef typename impl::type type;
typedef typename impl::continue_type continue_type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Begin const& beg, End const& end, State const& state
, Context const& context, Fun const& fun)
{
return impl::call(fusion::next(beg), end, state, context, fun);
}
};
template <typename Begin, typename End, typename State, typename Context, typename Fun, bool IsDone>
struct segmented_fold_until_iterate
{
typedef
typename result_of::empty<
typename remove_reference<
typename result_of::deref<Begin>::type
>::type
>::type
empty_type;
typedef
segmented_fold_until_iterate_skip_empty<Begin, End, State, Context, Fun, empty_type::value>
impl;
typedef typename impl::type type;
typedef typename impl::continue_type continue_type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Begin const& beg, End const& end, State const& state
, Context const& context, Fun const& fun)
{
return impl::call(beg, end, state, context, fun);
}
};
template <typename Begin, typename End, typename State, typename Context, typename Fun>
struct segmented_fold_until_iterate<Begin, End, State, Context, Fun, true>
{
typedef State type;
typedef mpl::true_ continue_type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Begin const&, End const&, State const& state
, Context const&, Fun const&)
{
return state;
}
};
template <typename Segments, typename State, typename Context, typename Fun>
struct segmented_fold_until_on_segments
{
typedef
segmented_fold_until_iterate<
typename result_of::begin<Segments>::type
, typename result_of::end<Segments>::type
, State
, Context
, Fun
>
impl;
typedef typename impl::type type;
typedef typename impl::continue_type continue_type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Segments& segs, State const& state, Context const& context, Fun const& fun)
{
return impl::call(fusion::begin(segs), fusion::end(segs), state, context, fun);
}
};
}
}}
#endif
@@ -0,0 +1,16 @@
/*=============================================================================
Copyright (c) 2001-2011 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_UNKNOWN_KEY_09242005_1219)
#define FUSION_UNKNOWN_KEY_09242005_1219
namespace boost { namespace fusion { namespace detail
{
template <int index>
struct unknown_key {};
}}}
#endif