Updated Boost libraries to version 1.49, and recompiled them with NDK r8d
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
@@ -16,4 +16,10 @@
|
||||
#include <boost/fusion/adapted/std_pair.hpp>
|
||||
#include <boost/fusion/adapted/struct.hpp>
|
||||
|
||||
// The std_tuple_iterator adaptor only supports implementations
|
||||
// using variadic templates
|
||||
#if !defined(BOOST_NO_VARIADIC_TEMPLATES)
|
||||
#include <boost/fusion/adapted/std_tuple.hpp>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2009 Joel de Guzman
|
||||
Copyright (c) 2009-2010 Hartmut Kaiser
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2010-2011 Christopher Schmidt
|
||||
|
||||
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)
|
||||
@@ -49,7 +49,7 @@
|
||||
(1)NAME_SEQ, \
|
||||
struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0(0,0,0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ADT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ADT(NAME, ATTRIBUTES) \
|
||||
@@ -58,7 +58,7 @@
|
||||
(0)(NAME), \
|
||||
struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0(0,0,0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ADT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ADT_AS_VIEW(NAME, ATTRIBUTES) \
|
||||
@@ -67,7 +67,7 @@
|
||||
(0)(NAME), \
|
||||
struct_tag, \
|
||||
1, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ADT_FILLER_0(0,0,0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ADT_C)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2009 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2010-2011 Christopher Schmidt
|
||||
|
||||
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)
|
||||
@@ -63,7 +63,8 @@
|
||||
(1)NAME_SEQ, \
|
||||
assoc_struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0(0,0,0,0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT(NAME, ATTRIBUTES) \
|
||||
@@ -72,7 +73,8 @@
|
||||
(0)(NAME), \
|
||||
assoc_struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0(0,0,0,0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_ADT_AS_VIEW(NAME, ATTRIBUTES) \
|
||||
@@ -81,7 +83,8 @@
|
||||
(0)(NAME), \
|
||||
assoc_struct_tag, \
|
||||
1, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0(0,0,0,0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_ADT_C)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
@@ -17,5 +17,6 @@
|
||||
#include <boost/fusion/adapted/mpl/detail/has_key_impl.hpp>
|
||||
#include <boost/fusion/adapted/mpl/detail/category_of_impl.hpp>
|
||||
#include <boost/fusion/adapted/mpl/detail/is_view_impl.hpp>
|
||||
#include <boost/fusion/adapted/mpl/detail/empty_impl.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
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_EMPTY_IMPL_31122005_1554)
|
||||
@@ -10,12 +10,15 @@
|
||||
|
||||
#include <boost/mpl/empty.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_sequence_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct empty_impl;
|
||||
|
||||
template <>
|
||||
struct empty_impl<mpl_sequence_tag>
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
@@ -11,12 +11,7 @@
|
||||
#define BOOST_FUSION_ADAPTED_STD_PAIR_HPP
|
||||
|
||||
#include <boost/fusion/adapted/struct/adapt_struct.hpp>
|
||||
|
||||
namespace std
|
||||
{
|
||||
template<class T1, class T2>
|
||||
struct pair;
|
||||
}
|
||||
#include <utility>
|
||||
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT(
|
||||
(T1)(T2),(std::pair)(T1)(T2),(T1, first)(T2, second))
|
||||
|
||||
21
project/jni/boost/include/boost/fusion/adapted/std_tuple.hpp
Normal file
21
project/jni/boost/include/boost/fusion/adapted/std_tuple.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
/*=============================================================================
|
||||
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(BOOST_FUSION_BOOST_TUPLE_09242011_1744)
|
||||
#define BOOST_FUSION_BOOST_TUPLE_09242011_1744
|
||||
|
||||
#include <boost/fusion/adapted/std_tuple/detail/is_view_impl.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple/detail/is_sequence_impl.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple/detail/category_of_impl.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple/detail/begin_impl.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple/detail/end_impl.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple/detail/size_impl.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple/detail/at_impl.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple/tag_of.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
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(BOOST_FUSION_AT_IMPL_09242011_1744)
|
||||
#define BOOST_FUSION_AT_IMPL_09242011_1744
|
||||
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_tuple_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename T>
|
||||
struct at_impl;
|
||||
|
||||
template <>
|
||||
struct at_impl<std_tuple_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename remove_const<Sequence>::type seq_type;
|
||||
typedef std::tuple_element<N::value, seq_type> element;
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<Sequence>
|
||||
, fusion::detail::cref_result<element>
|
||||
, fusion::detail::ref_result<element>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Sequence& seq)
|
||||
{
|
||||
return std::get<N::value>(seq);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
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(BOOST_FUSION_BEGIN_IMPL_09242011_1744)
|
||||
#define BOOST_FUSION_BEGIN_IMPL_09242011_1744
|
||||
|
||||
#include <boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_tuple_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename T>
|
||||
struct begin_impl;
|
||||
|
||||
template <>
|
||||
struct begin_impl<std_tuple_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef std_tuple_iterator<Sequence, 0> type;
|
||||
|
||||
static type
|
||||
call(Sequence& v)
|
||||
{
|
||||
return type(v);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,32 @@
|
||||
/*=============================================================================
|
||||
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(BOOST_FUSION_CATEGORY_OF_IMPL_09272006_0726)
|
||||
#define BOOST_FUSION_CATEGORY_OF_IMPL_09272006_0726
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_tuple_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename T>
|
||||
struct category_of_impl;
|
||||
|
||||
template<>
|
||||
struct category_of_impl<std_tuple_tag>
|
||||
{
|
||||
template<typename T>
|
||||
struct apply
|
||||
{
|
||||
typedef random_access_traversal_tag type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,43 @@
|
||||
/*=============================================================================
|
||||
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(BOOST_FUSION_END_IMPL_09242011_1744)
|
||||
#define BOOST_FUSION_END_IMPL_09242011_1744
|
||||
|
||||
#include <boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <tuple>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_tuple_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename T>
|
||||
struct end_impl;
|
||||
|
||||
template <>
|
||||
struct end_impl<std_tuple_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename remove_const<Sequence>::type seq_type;
|
||||
static int const size = std::tuple_size<seq_type>::value;
|
||||
typedef std_tuple_iterator<Sequence, size> type;
|
||||
|
||||
static type
|
||||
call(Sequence& v)
|
||||
{
|
||||
return type(v);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
/*=============================================================================
|
||||
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(BOOST_FUSION_IS_SEQUENCE_IMPL_09242011_1744)
|
||||
#define BOOST_FUSION_IS_SEQUENCE_IMPL_09242011_1744
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_tuple_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct is_sequence_impl;
|
||||
|
||||
template<>
|
||||
struct is_sequence_impl<std_tuple_tag>
|
||||
{
|
||||
template<typename Sequence>
|
||||
struct apply : mpl::true_ {};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
/*=============================================================================
|
||||
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(BOOST_FUSION_IS_VIEW_IMPL_09242011_1744)
|
||||
#define BOOST_FUSION_IS_VIEW_IMPL_09242011_1744
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_tuple_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct is_view_impl;
|
||||
|
||||
template<>
|
||||
struct is_view_impl<std_tuple_tag>
|
||||
{
|
||||
template<typename T>
|
||||
struct apply : mpl::false_ {};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,36 @@
|
||||
/*=============================================================================
|
||||
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(BOOST_FUSION_SIZE_IMPL_09242011_1744)
|
||||
#define BOOST_FUSION_SIZE_IMPL_09242011_1744
|
||||
|
||||
#include <tuple>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_tuple_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename T>
|
||||
struct size_impl;
|
||||
|
||||
template <>
|
||||
struct size_impl<std_tuple_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply :
|
||||
mpl::int_<std::tuple_size<
|
||||
typename remove_const<Sequence>::type>::value
|
||||
>
|
||||
{};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,30 @@
|
||||
/*=============================================================================
|
||||
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(BOOST_FUSION_VALUE_AT_IMPL_09242011_1744)
|
||||
#define BOOST_FUSION_VALUE_AT_IMPL_09242011_1744
|
||||
|
||||
#include <tuple>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_tuple_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename T>
|
||||
struct value_at_impl;
|
||||
|
||||
template <>
|
||||
struct value_at_impl<std_tuple_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply : std::tuple_element<N::value, Sequence> {};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,107 @@
|
||||
/*=============================================================================
|
||||
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_STD_TUPLE_ITERATOR_09112011_1905)
|
||||
#define FUSION_STD_TUPLE_ITERATOR_09112011_1905
|
||||
|
||||
#include <boost/fusion/iterator/iterator_facade.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
template <typename Tuple, int Index>
|
||||
struct std_tuple_iterator_identity;
|
||||
|
||||
template <typename Tuple, int Index>
|
||||
struct std_tuple_iterator
|
||||
: iterator_facade<
|
||||
std_tuple_iterator<Tuple, Index>
|
||||
, random_access_traversal_tag>
|
||||
{
|
||||
typedef Tuple tuple_type;
|
||||
static int const index = Index;
|
||||
typedef std_tuple_iterator_identity<
|
||||
typename add_const<Tuple>::type, Index>
|
||||
identity;
|
||||
|
||||
explicit std_tuple_iterator(Tuple& tuple)
|
||||
: tuple(tuple) {}
|
||||
|
||||
Tuple& tuple;
|
||||
|
||||
template <typename Iterator>
|
||||
struct value_of
|
||||
: std::tuple_element<Iterator::index,
|
||||
typename remove_const<typename Iterator::tuple_type>::type> {};
|
||||
|
||||
template <typename Iterator>
|
||||
struct deref
|
||||
{
|
||||
typedef value_of<Iterator> element;
|
||||
typedef typename
|
||||
mpl::eval_if<
|
||||
is_const<typename Iterator::tuple_type>
|
||||
, fusion::detail::cref_result<element>
|
||||
, fusion::detail::ref_result<element>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(Iterator const& iter)
|
||||
{
|
||||
return std::get<Index>(iter.tuple);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Iterator, typename N>
|
||||
struct advance
|
||||
{
|
||||
static int const index = Iterator::index;
|
||||
typedef typename Iterator::tuple_type tuple_type;
|
||||
typedef std_tuple_iterator<tuple_type, index+N::value> type;
|
||||
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.tuple);
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Iterator>
|
||||
struct next : advance<Iterator, mpl::int_<1>> {};
|
||||
|
||||
template <typename Iterator>
|
||||
struct prior : advance<Iterator, mpl::int_<-1>> {};
|
||||
|
||||
template <typename I1, typename I2>
|
||||
struct equal_to
|
||||
: is_same<typename I1::identity, typename I2::identity> {};
|
||||
|
||||
template <typename First, typename Last>
|
||||
struct distance
|
||||
{
|
||||
typedef mpl::int_<Last::index-First::index> type;
|
||||
|
||||
static type
|
||||
call(First const&, Last const&)
|
||||
{
|
||||
return type();
|
||||
}
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
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(BOOST_FUSION_TAG_OF_09112011_1842)
|
||||
#define BOOST_FUSION_TAG_OF_09112011_1842
|
||||
|
||||
#include <tuple>
|
||||
#include <boost/fusion/support/tag_of_fwd.hpp>
|
||||
|
||||
namespace std
|
||||
{
|
||||
template <typename... Elements>
|
||||
class tuple;
|
||||
}
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct std_tuple_tag;
|
||||
struct fusion_sequence_tag;
|
||||
|
||||
namespace traits
|
||||
{
|
||||
template <typename... Elements>
|
||||
struct tag_of<std::tuple<Elements...>>
|
||||
{
|
||||
typedef std_tuple_tag type;
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename>
|
||||
struct sequence_tag;
|
||||
|
||||
template <typename... Elements>
|
||||
struct sequence_tag<std::tuple<Elements...>>
|
||||
{
|
||||
typedef fusion::fusion_sequence_tag type;
|
||||
};
|
||||
|
||||
template <typename... Elements>
|
||||
struct sequence_tag<std::tuple<Elements...> const>
|
||||
{
|
||||
typedef fusion::fusion_sequence_tag type;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2007 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
Copyright (c) 2009-2011 Christopher Schmidt
|
||||
|
||||
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)
|
||||
@@ -69,7 +69,8 @@
|
||||
(1)NAME_SEQ, \
|
||||
assoc_struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(0,0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT(NAME, ATTRIBUTES) \
|
||||
@@ -78,7 +79,8 @@
|
||||
(0)(NAME), \
|
||||
assoc_struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(0,0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_AS_VIEW(NAME, ATTRIBUTES) \
|
||||
@@ -87,7 +89,8 @@
|
||||
(0)(NAME), \
|
||||
assoc_struct_tag, \
|
||||
1, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(0,0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_C)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2010-2011 Christopher Schmidt
|
||||
|
||||
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)
|
||||
@@ -27,7 +27,8 @@
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_AS_VIEW( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \
|
||||
BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_0 ATTRIBUTES,_END))
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_0 ATTRIBUTES, \
|
||||
_END))
|
||||
|
||||
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS( \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2007 Joel de Guzman
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
Copyright (c) 2009-2011 Christopher Schmidt
|
||||
|
||||
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)
|
||||
@@ -46,7 +46,8 @@
|
||||
(1)NAME_SEQ, \
|
||||
struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
((0,0)) BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_STRUCT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_STRUCT(NAME, ATTRIBUTES) \
|
||||
@@ -55,7 +56,7 @@
|
||||
(0)(NAME), \
|
||||
struct_tag, \
|
||||
0, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_STRUCT_C)
|
||||
|
||||
#define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ATTRIBUTES) \
|
||||
@@ -64,7 +65,7 @@
|
||||
(0)(NAME), \
|
||||
struct_tag, \
|
||||
1, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
|
||||
BOOST_FUSION_ADAPT_STRUCT_C)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2007 Joel de Guzman
|
||||
Copyright (c) 2009-2010 Hartmut Kaiser
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2010-2011 Christopher Schmidt
|
||||
|
||||
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)
|
||||
@@ -29,7 +29,8 @@
|
||||
\
|
||||
BOOST_FUSION_ADAPT_STRUCT_AS_VIEW( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_0 ATTRIBUTES,_END))
|
||||
BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_0 ATTRIBUTES,_END))
|
||||
|
||||
#define BOOST_FUSION_ADAPT_STRUCT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \
|
||||
BOOST_FUSION_ADAPT_STRUCT_NAMED_NS( \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2010-2011 Christopher Schmidt
|
||||
|
||||
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)
|
||||
@@ -18,7 +18,8 @@
|
||||
TEMPLATE_PARAMS_SEQ, \
|
||||
(0)NAMESPACE_SEQ, \
|
||||
NAME, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(0,0,0)ATTRIBUTES,_END), \
|
||||
3) \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( \
|
||||
@@ -31,7 +32,8 @@
|
||||
BOOST_FUSION_DEFINE_STRUCT_IMPL( \
|
||||
(0)NAMESPACE_SEQ, \
|
||||
NAME, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT( \
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(0,0,0)ATTRIBUTES,_END), \
|
||||
3) \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_ASSOC_STRUCT( \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2010-2011 Christopher Schmidt
|
||||
|
||||
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)
|
||||
@@ -18,7 +18,7 @@
|
||||
TEMPLATE_PARAMS_SEQ, \
|
||||
(0)NAMESPACE_SEQ, \
|
||||
NAME, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
|
||||
2) \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT( \
|
||||
@@ -31,7 +31,7 @@
|
||||
BOOST_FUSION_DEFINE_STRUCT_IMPL( \
|
||||
(0)NAMESPACE_SEQ, \
|
||||
NAME, \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \
|
||||
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
|
||||
2) \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_STRUCT( \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2009 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
Copyright (c) 2009-2011 Christopher Schmidt
|
||||
|
||||
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)
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <boost/preprocessor/seq/seq.hpp>
|
||||
#include <boost/preprocessor/tuple/eat.hpp>
|
||||
#include <boost/preprocessor/tuple/elem.hpp>
|
||||
#include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/tag.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
@@ -185,18 +186,21 @@ namespace boost
|
||||
\
|
||||
namespace extension \
|
||||
{ \
|
||||
BOOST_PP_SEQ_FOR_EACH_I_R( \
|
||||
1, \
|
||||
BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL, \
|
||||
(ATTRIBUTES_CALLBACK,TEMPLATE_PARAMS_SEQ,NAME_SEQ), \
|
||||
ATTRIBUTES_SEQ) \
|
||||
BOOST_PP_IF( \
|
||||
BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \
|
||||
BOOST_PP_SEQ_FOR_EACH_I_R, \
|
||||
BOOST_PP_TUPLE_EAT(4))( \
|
||||
1, \
|
||||
BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL, \
|
||||
(ATTRIBUTES_CALLBACK,TEMPLATE_PARAMS_SEQ,NAME_SEQ), \
|
||||
BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ)) \
|
||||
\
|
||||
template< \
|
||||
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \
|
||||
TEMPLATE_PARAMS_SEQ) \
|
||||
> \
|
||||
struct struct_size<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)> \
|
||||
: mpl::int_<BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)> \
|
||||
: mpl::int_<BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ))> \
|
||||
{}; \
|
||||
\
|
||||
template< \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
Copyright (c) 2010-2011 Christopher Schmidt
|
||||
|
||||
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)
|
||||
@@ -201,7 +201,7 @@
|
||||
>::param_type BOOST_PP_CAT(_,I)
|
||||
|
||||
#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N( \
|
||||
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \
|
||||
1, \
|
||||
@@ -228,7 +228,7 @@
|
||||
>::param_type BOOST_PP_CAT(_,I)
|
||||
|
||||
#define BOOST_FUSION_DEFINE_STRUCT_CTOR_N( \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \
|
||||
1, \
|
||||
@@ -242,15 +242,44 @@
|
||||
ATTRIBUTES_SEQ) \
|
||||
{}
|
||||
|
||||
#define BOOST_FUSION_DEFINE_STRUCT_CTOR(ATTRIBUTES_SEQ) \
|
||||
#define BOOST_FUSION_DEFINE_STRUCT_CTOR( \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \
|
||||
BOOST_FUSION_DEFINE_STRUCT_CTOR_N, \
|
||||
BOOST_FUSION_DEFINE_STRUCT_CTOR_1)
|
||||
BOOST_FUSION_DEFINE_STRUCT_CTOR_1)( \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)
|
||||
|
||||
#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR(ATTRIBUTES_SEQ) \
|
||||
#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR( \
|
||||
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \
|
||||
BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N, \
|
||||
BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1)
|
||||
BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1)( \
|
||||
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)
|
||||
|
||||
#define BOOST_FUSION_DEFINE_NONEMPTY_STRUCT_IMPL( \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL( \
|
||||
NAME, BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
BOOST_FUSION_DEFINE_STRUCT_CTOR( \
|
||||
NAME, BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), ATTRIBUTE_TUPEL_SIZE)
|
||||
|
||||
#define BOOST_FUSION_DEFINE_EMPTY_STRUCT_IMPL( \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
template<typename Seq> \
|
||||
NAME(Seq const&) \
|
||||
{} \
|
||||
\
|
||||
template<typename Seq> \
|
||||
self_type& \
|
||||
operator=(Seq const& seq) \
|
||||
{ \
|
||||
return *this; \
|
||||
}
|
||||
|
||||
#define BOOST_FUSION_DEFINE_STRUCT_IMPL( \
|
||||
NAMESPACE_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
@@ -261,15 +290,32 @@
|
||||
{ \
|
||||
typedef NAME self_type; \
|
||||
\
|
||||
BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL( \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
BOOST_FUSION_DEFINE_STRUCT_CTOR(ATTRIBUTES_SEQ)( \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \
|
||||
BOOST_FUSION_DEFINE_NONEMPTY_STRUCT_IMPL, \
|
||||
BOOST_FUSION_DEFINE_EMPTY_STRUCT_IMPL)( \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
}; \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ)
|
||||
|
||||
#define BOOST_FUSION_DEFINE_NONEMPTY_TPL_STRUCT_IMPL( \
|
||||
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL( \
|
||||
NAME, BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR( \
|
||||
TEMPLATE_PARAMS_SEQ, \
|
||||
NAME, \
|
||||
BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), \
|
||||
ATTRIBUTE_TUPEL_SIZE)
|
||||
|
||||
#define BOOST_FUSION_DEFINE_EMPTY_TPL_STRUCT_IMPL( \
|
||||
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
BOOST_FUSION_DEFINE_EMPTY_STRUCT_IMPL( \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)
|
||||
|
||||
#define BOOST_FUSION_DEFINE_TPL_STRUCT_IMPL( \
|
||||
TEMPLATE_PARAMS_SEQ, \
|
||||
NAMESPACE_SEQ, \
|
||||
@@ -287,11 +333,10 @@
|
||||
{ \
|
||||
typedef NAME self_type; \
|
||||
\
|
||||
BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL( \
|
||||
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
\
|
||||
BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR(ATTRIBUTES_SEQ)( \
|
||||
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
|
||||
BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \
|
||||
BOOST_FUSION_DEFINE_NONEMPTY_TPL_STRUCT_IMPL, \
|
||||
BOOST_FUSION_DEFINE_EMPTY_TPL_STRUCT_IMPL)( \
|
||||
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)\
|
||||
}; \
|
||||
\
|
||||
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2007 Joel de Guzman
|
||||
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_INCLUDE_UNFUSED_LVALUE_ARGS)
|
||||
#define FUSION_INCLUDE_UNFUSED_LVALUE_ARGS
|
||||
#if !defined(FUSION_ALGORITHM_AUXILIARY_02192011_0907)
|
||||
#define FUSION_ALGORITHM_AUXILIARY_02192011_0907
|
||||
|
||||
#include <boost/fusion/functional/adapter/unfused_lvalue_args.hpp>
|
||||
#include <boost/fusion/algorithm/auxiliary/copy.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,73 @@
|
||||
/*=============================================================================
|
||||
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_COPY_02162011_2308)
|
||||
#define FUSION_COPY_02162011_2308
|
||||
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/sequence/comparison/detail/equal_to.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning (disable: 4100) // unreferenced formal parameter
|
||||
#endif
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template <typename Seq1, typename Seq2>
|
||||
struct sequence_copy
|
||||
{
|
||||
typedef typename result_of::end<Seq1>::type end1_type;
|
||||
typedef typename result_of::end<Seq2>::type end2_type;
|
||||
|
||||
template <typename I1, typename I2>
|
||||
static void
|
||||
call(I1 const&, I2 const&, mpl::true_)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename I1, typename I2>
|
||||
static void
|
||||
call(I1 const& src, I2 const& dest, mpl::false_)
|
||||
{
|
||||
*dest = *src;
|
||||
call(fusion::next(src), fusion::next(dest));
|
||||
}
|
||||
|
||||
template <typename I1, typename I2>
|
||||
static void
|
||||
call(I1 const& src, I2 const& dest)
|
||||
{
|
||||
typename result_of::equal_to<I1, end1_type>::type eq;
|
||||
return call(src, dest, eq);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
template <typename Seq1, typename Seq2>
|
||||
inline void
|
||||
copy(Seq1 const& src, Seq2& dest)
|
||||
{
|
||||
BOOST_STATIC_ASSERT(
|
||||
result_of::size<Seq1>::value == result_of::size<Seq2>::value);
|
||||
|
||||
detail::sequence_copy<
|
||||
Seq1 const, Seq2>::
|
||||
call(fusion::begin(src), fusion::begin(dest));
|
||||
}
|
||||
}}
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
@@ -7,6 +7,7 @@
|
||||
#if !defined(FUSION_ACCUMULATE_09172005_1032)
|
||||
#define FUSION_ACCUMULATE_09172005_1032
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/accumulate_fwd.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/fold.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*=============================================================================
|
||||
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_ACCUMULATE_FWD_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename State, typename F>
|
||||
struct accumulate;
|
||||
}
|
||||
|
||||
template <typename Sequence, typename State, typename F>
|
||||
typename result_of::accumulate<Sequence, State const, F>::type
|
||||
accumulate(Sequence& seq, State const& state, F f);
|
||||
|
||||
template <typename Sequence, typename State, typename F>
|
||||
typename result_of::accumulate<Sequence const, State const, F>::type
|
||||
accumulate(Sequence const& seq, State const& state, F f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,34 +1,12 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
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_ALGORITHM_ITERATION_DETAIL_FOLD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_DETAIL_FOLD_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/empty.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_FUSION_REVERSE_FOLD
|
||||
# ifdef BOOST_FUSION_ITER_FOLD
|
||||
@@ -185,7 +163,7 @@ namespace boost { namespace fusion
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
call(State const& state,It0 const& it0, F)
|
||||
{
|
||||
return static_cast<Result>(state);
|
||||
}
|
||||
@@ -347,53 +325,73 @@ namespace boost { namespace fusion
|
||||
type;
|
||||
};
|
||||
|
||||
template<int SeqSize, typename StateRef, typename It0, typename F>
|
||||
template<int SeqSize, typename StateRef, typename Seq, typename F>
|
||||
struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)
|
||||
{
|
||||
typedef typename
|
||||
BOOST_PP_CAT(
|
||||
result_of_first_unrolled,BOOST_FUSION_FOLD_NAME)<
|
||||
StateRef
|
||||
, BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(It0)
|
||||
, BOOST_FUSION_FOLD_IMPL_FIRST_IT_META_TRANSFORM(
|
||||
typename result_of::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION<Seq>::type
|
||||
)
|
||||
, F
|
||||
, SeqSize
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type
|
||||
call(StateRef state, It0 const& it0, F f)
|
||||
call(StateRef state, Seq& seq, F f)
|
||||
{
|
||||
return BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<
|
||||
type
|
||||
, SeqSize
|
||||
>::call(state,BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(it0),f);
|
||||
typedef
|
||||
BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<
|
||||
type
|
||||
, SeqSize
|
||||
>
|
||||
unrolled_impl;
|
||||
|
||||
return unrolled_impl::call(
|
||||
state,
|
||||
BOOST_FUSION_FOLD_IMPL_FIRST_IT_TRANSFORM(
|
||||
fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq)),
|
||||
f);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)<0,StateRef,It0,F>
|
||||
template<typename StateRef, typename Seq, typename F>
|
||||
struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)<0,StateRef,Seq,F>
|
||||
{
|
||||
typedef StateRef type;
|
||||
|
||||
static StateRef
|
||||
call(StateRef state, It0 const&, F)
|
||||
call(StateRef state, Seq&, F)
|
||||
{
|
||||
return static_cast<StateRef>(state);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename Seq, typename State, typename F, bool IsSegmented>
|
||||
struct BOOST_PP_CAT(result_of_, BOOST_FUSION_FOLD_NAME)
|
||||
: BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)<
|
||||
result_of::size<Seq>::value
|
||||
, typename add_reference<
|
||||
typename add_const<State>::type
|
||||
>::type
|
||||
, Seq
|
||||
, F
|
||||
>
|
||||
{};
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct BOOST_FUSION_FOLD_NAME
|
||||
: detail::BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME,_impl)<
|
||||
size<Seq>::value
|
||||
, typename add_reference<
|
||||
typename add_const<State>::type
|
||||
>::type
|
||||
, typename BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION<Seq>::type
|
||||
: detail::BOOST_PP_CAT(result_of_, BOOST_FUSION_FOLD_NAME)<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
, traits::is_segmented<Seq>::type::value
|
||||
>
|
||||
{};
|
||||
}
|
||||
@@ -404,11 +402,11 @@ namespace boost { namespace fusion
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq& seq,State const& state,F f)
|
||||
BOOST_FUSION_FOLD_NAME(Seq& seq, State const& state, F f)
|
||||
{
|
||||
return result_of::BOOST_FUSION_FOLD_NAME<Seq,State const,F>::call(
|
||||
state,
|
||||
fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq),
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
|
||||
@@ -418,11 +416,39 @@ namespace boost { namespace fusion
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq const& seq,State const& state,F f)
|
||||
BOOST_FUSION_FOLD_NAME(Seq const& seq, State const& state, F f)
|
||||
{
|
||||
return result_of::BOOST_FUSION_FOLD_NAME<Seq const,State const,F>::call(
|
||||
state,
|
||||
fusion::BOOST_FUSION_FOLD_IMPL_FIRST_IT_FUNCTION(seq),
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq& seq, State& state, F f)
|
||||
{
|
||||
return result_of::BOOST_FUSION_FOLD_NAME<Seq,State,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::BOOST_FUSION_FOLD_NAME<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
BOOST_FUSION_FOLD_NAME(Seq const& seq, State& state, F f)
|
||||
{
|
||||
return result_of::BOOST_FUSION_FOLD_NAME<Seq const,State,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/distance.hpp>
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
@@ -36,7 +37,7 @@ namespace detail
|
||||
|
||||
template <typename Sequence, typename F, typename Tag>
|
||||
inline void
|
||||
for_each(Sequence& seq, F const& f, Tag)
|
||||
for_each_dispatch(Sequence& seq, F const& f, Tag)
|
||||
{
|
||||
detail::for_each_linear(
|
||||
fusion::begin(seq)
|
||||
@@ -117,12 +118,19 @@ namespace detail
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
inline void
|
||||
for_each(Sequence& seq, F const& f, random_access_traversal_tag)
|
||||
for_each_dispatch(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);
|
||||
}
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
inline void
|
||||
for_each(Sequence& seq, F const& f, mpl::false_) // unsegmented implementation
|
||||
{
|
||||
detail::for_each_dispatch(seq, f, typename traits::category_of<Sequence>::type());
|
||||
}
|
||||
}}}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,381 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<typename State, typename It, typename F>
|
||||
struct fold_lvalue_state
|
||||
: boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename add_const<State>::type>::type,
|
||||
typename fusion::result_of::deref<It>::type)
|
||||
>
|
||||
{};
|
||||
template<typename Result,int N>
|
||||
struct unrolled_fold
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It0 const
|
||||
>::type
|
||||
It1;
|
||||
It1 it1 = fusion::next(it0);
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It1
|
||||
>::type
|
||||
It2;
|
||||
It2 it2 = fusion::next(it1);
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It2
|
||||
>::type
|
||||
It3;
|
||||
It3 it3 = fusion::next(it2);
|
||||
typedef typename fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,fusion::deref(it0));
|
||||
typedef typename fold_lvalue_state<State1,It1,F>::type State2;
|
||||
State2 const state2=f(state1,fusion::deref(it1));
|
||||
typedef typename fold_lvalue_state<State2,It2,F>::type State3;
|
||||
State3 const state3=f(state2,fusion::deref(it2));
|
||||
return unrolled_fold<
|
||||
Result
|
||||
, N-4
|
||||
>::call(
|
||||
f(state3,fusion::deref(it3)),
|
||||
fusion::next(it3),
|
||||
f);
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_fold<Result,3>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It0 const
|
||||
>::type
|
||||
It1;
|
||||
It1 it1 = fusion::next(it0);
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It1
|
||||
>::type
|
||||
It2;
|
||||
It2 it2 = fusion::next(it1);
|
||||
typedef typename fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,fusion::deref(it0));
|
||||
typedef typename fold_lvalue_state<State1,It1,F>::type State2;
|
||||
State2 const state2=f(state1,fusion::deref(it1));
|
||||
return f(state2,fusion::deref(it2));
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_fold<Result,2>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,fusion::deref(it0));
|
||||
return f(
|
||||
state1,
|
||||
fusion::deref( fusion::next(it0)));
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_fold<Result,1>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
return f(state,
|
||||
fusion::deref(it0));
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_fold<Result,0>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0, F)
|
||||
{
|
||||
return static_cast<Result>(state);
|
||||
}
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F, int N>
|
||||
struct result_of_unrolled_fold
|
||||
{
|
||||
typedef typename
|
||||
fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
rest1;
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It0 const
|
||||
>::type
|
||||
it1;
|
||||
typedef typename
|
||||
fold_lvalue_state<
|
||||
rest1
|
||||
, it1
|
||||
, F
|
||||
>::type
|
||||
rest2;
|
||||
typedef typename
|
||||
result_of::next<it1>::type
|
||||
it2;
|
||||
typedef typename
|
||||
fold_lvalue_state<
|
||||
rest2
|
||||
, it2
|
||||
, F
|
||||
>::type
|
||||
rest3;
|
||||
typedef typename
|
||||
result_of::next<it2>::type
|
||||
it3;
|
||||
typedef typename
|
||||
result_of_unrolled_fold<
|
||||
typename fold_lvalue_state<
|
||||
rest3
|
||||
, it3
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::next<
|
||||
it3
|
||||
>::type
|
||||
, F
|
||||
, N-4
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 3
|
||||
>
|
||||
{
|
||||
typedef typename
|
||||
fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
rest1;
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It0 const
|
||||
>::type
|
||||
it1;
|
||||
typedef typename
|
||||
fold_lvalue_state<
|
||||
typename fold_lvalue_state<
|
||||
rest1
|
||||
, it1
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::next<
|
||||
it1 const
|
||||
>::type const
|
||||
, F
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 2
|
||||
>
|
||||
: fold_lvalue_state<
|
||||
typename fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::next<
|
||||
It0 const
|
||||
>::type const
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 1
|
||||
>
|
||||
: fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 0
|
||||
>
|
||||
{
|
||||
typedef StateRef type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F, int SeqSize>
|
||||
struct result_of_first_unrolledfold
|
||||
{
|
||||
typedef typename
|
||||
result_of_unrolled_fold<
|
||||
typename boost::result_of<
|
||||
F(
|
||||
StateRef,
|
||||
typename fusion::result_of::deref< It0 const>::type
|
||||
)
|
||||
>::type
|
||||
, typename result_of::next<
|
||||
It0 const
|
||||
>::type
|
||||
, F
|
||||
, SeqSize-1
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<int SeqSize, typename StateRef, typename Seq, typename F>
|
||||
struct fold_impl
|
||||
{
|
||||
typedef typename
|
||||
result_of_first_unrolledfold<
|
||||
StateRef
|
||||
, typename result_of::begin<Seq>::type
|
||||
, F
|
||||
, SeqSize
|
||||
>::type
|
||||
type;
|
||||
static type
|
||||
call(StateRef state, Seq& seq, F f)
|
||||
{
|
||||
typedef
|
||||
unrolled_fold<
|
||||
type
|
||||
, SeqSize
|
||||
>
|
||||
unrolled_impl;
|
||||
return unrolled_impl::call(
|
||||
state,
|
||||
fusion::begin(seq),
|
||||
f);
|
||||
}
|
||||
};
|
||||
template<typename StateRef, typename Seq, typename F>
|
||||
struct fold_impl<0,StateRef,Seq,F>
|
||||
{
|
||||
typedef StateRef type;
|
||||
static StateRef
|
||||
call(StateRef state, Seq&, F)
|
||||
{
|
||||
return static_cast<StateRef>(state);
|
||||
}
|
||||
};
|
||||
template<typename Seq, typename State, typename F, bool IsSegmented>
|
||||
struct result_of_fold
|
||||
: fold_impl<
|
||||
result_of::size<Seq>::value
|
||||
, typename add_reference<
|
||||
typename add_const<State>::type
|
||||
>::type
|
||||
, Seq
|
||||
, F
|
||||
>
|
||||
{};
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct fold
|
||||
: detail::result_of_fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
, traits::is_segmented<Seq>::type::value
|
||||
>
|
||||
{};
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq& seq, State const& state, F f)
|
||||
{
|
||||
return result_of::fold<Seq,State const,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq const& seq, State const& state, F f)
|
||||
{
|
||||
return result_of::fold<Seq const,State const,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq& seq, State& state, F f)
|
||||
{
|
||||
return result_of::fold<Seq,State,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq const& seq, State& state, F f)
|
||||
{
|
||||
return result_of::fold<Seq const,State,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,380 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<typename State, typename It, typename F>
|
||||
struct iter_fold_lvalue_state
|
||||
: boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename add_const<State>::type>::type,
|
||||
It&)
|
||||
>
|
||||
{};
|
||||
template<typename Result,int N>
|
||||
struct unrolled_iter_fold
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It0 const
|
||||
>::type
|
||||
It1;
|
||||
It1 it1 = fusion::next(it0);
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It1
|
||||
>::type
|
||||
It2;
|
||||
It2 it2 = fusion::next(it1);
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It2
|
||||
>::type
|
||||
It3;
|
||||
It3 it3 = fusion::next(it2);
|
||||
typedef typename iter_fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,it0);
|
||||
typedef typename iter_fold_lvalue_state<State1,It1,F>::type State2;
|
||||
State2 const state2=f(state1,it1);
|
||||
typedef typename iter_fold_lvalue_state<State2,It2,F>::type State3;
|
||||
State3 const state3=f(state2,it2);
|
||||
return unrolled_iter_fold<
|
||||
Result
|
||||
, N-4
|
||||
>::call(
|
||||
f(state3,it3),
|
||||
fusion::next(it3),
|
||||
f);
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_iter_fold<Result,3>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It0 const
|
||||
>::type
|
||||
It1;
|
||||
It1 it1 = fusion::next(it0);
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It1
|
||||
>::type
|
||||
It2;
|
||||
It2 it2 = fusion::next(it1);
|
||||
typedef typename iter_fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,it0);
|
||||
typedef typename iter_fold_lvalue_state<State1,It1,F>::type State2;
|
||||
State2 const state2=f(state1,it1);
|
||||
return f(state2,it2);
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_iter_fold<Result,2>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename iter_fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,it0);
|
||||
return f(
|
||||
state1,
|
||||
fusion::next(it0));
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_iter_fold<Result,1>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
return f(state,
|
||||
it0);
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_iter_fold<Result,0>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0, F)
|
||||
{
|
||||
return static_cast<Result>(state);
|
||||
}
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F, int N>
|
||||
struct result_of_unrolled_iter_fold
|
||||
{
|
||||
typedef typename
|
||||
iter_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
rest1;
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It0 const
|
||||
>::type
|
||||
it1;
|
||||
typedef typename
|
||||
iter_fold_lvalue_state<
|
||||
rest1
|
||||
, it1
|
||||
, F
|
||||
>::type
|
||||
rest2;
|
||||
typedef typename
|
||||
result_of::next<it1>::type
|
||||
it2;
|
||||
typedef typename
|
||||
iter_fold_lvalue_state<
|
||||
rest2
|
||||
, it2
|
||||
, F
|
||||
>::type
|
||||
rest3;
|
||||
typedef typename
|
||||
result_of::next<it2>::type
|
||||
it3;
|
||||
typedef typename
|
||||
result_of_unrolled_iter_fold<
|
||||
typename iter_fold_lvalue_state<
|
||||
rest3
|
||||
, it3
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::next<
|
||||
it3
|
||||
>::type
|
||||
, F
|
||||
, N-4
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_iter_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 3
|
||||
>
|
||||
{
|
||||
typedef typename
|
||||
iter_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
rest1;
|
||||
typedef typename
|
||||
result_of::next<
|
||||
It0 const
|
||||
>::type
|
||||
it1;
|
||||
typedef typename
|
||||
iter_fold_lvalue_state<
|
||||
typename iter_fold_lvalue_state<
|
||||
rest1
|
||||
, it1
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::next<
|
||||
it1 const
|
||||
>::type const
|
||||
, F
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_iter_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 2
|
||||
>
|
||||
: iter_fold_lvalue_state<
|
||||
typename iter_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::next<
|
||||
It0 const
|
||||
>::type const
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_iter_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 1
|
||||
>
|
||||
: iter_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_iter_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 0
|
||||
>
|
||||
{
|
||||
typedef StateRef type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F, int SeqSize>
|
||||
struct result_of_first_unrollediter_fold
|
||||
{
|
||||
typedef typename
|
||||
result_of_unrolled_iter_fold<
|
||||
typename boost::result_of<
|
||||
F(
|
||||
StateRef,
|
||||
It0 const&
|
||||
)
|
||||
>::type
|
||||
, typename result_of::next<
|
||||
It0 const
|
||||
>::type
|
||||
, F
|
||||
, SeqSize-1
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<int SeqSize, typename StateRef, typename Seq, typename F>
|
||||
struct iter_fold_impl
|
||||
{
|
||||
typedef typename
|
||||
result_of_first_unrollediter_fold<
|
||||
StateRef
|
||||
, typename result_of::begin<Seq>::type
|
||||
, F
|
||||
, SeqSize
|
||||
>::type
|
||||
type;
|
||||
static type
|
||||
call(StateRef state, Seq& seq, F f)
|
||||
{
|
||||
typedef
|
||||
unrolled_iter_fold<
|
||||
type
|
||||
, SeqSize
|
||||
>
|
||||
unrolled_impl;
|
||||
return unrolled_impl::call(
|
||||
state,
|
||||
fusion::begin(seq),
|
||||
f);
|
||||
}
|
||||
};
|
||||
template<typename StateRef, typename Seq, typename F>
|
||||
struct iter_fold_impl<0,StateRef,Seq,F>
|
||||
{
|
||||
typedef StateRef type;
|
||||
static StateRef
|
||||
call(StateRef state, Seq&, F)
|
||||
{
|
||||
return static_cast<StateRef>(state);
|
||||
}
|
||||
};
|
||||
template<typename Seq, typename State, typename F, bool IsSegmented>
|
||||
struct result_of_iter_fold
|
||||
: iter_fold_impl<
|
||||
result_of::size<Seq>::value
|
||||
, typename add_reference<
|
||||
typename add_const<State>::type
|
||||
>::type
|
||||
, Seq
|
||||
, F
|
||||
>
|
||||
{};
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct iter_fold
|
||||
: detail::result_of_iter_fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
, traits::is_segmented<Seq>::type::value
|
||||
>
|
||||
{};
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq& seq, State const& state, F f)
|
||||
{
|
||||
return result_of::iter_fold<Seq,State const,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq const& seq, State const& state, F f)
|
||||
{
|
||||
return result_of::iter_fold<Seq const,State const,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq& seq, State& state, F f)
|
||||
{
|
||||
return result_of::iter_fold<Seq,State,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq const& seq, State& state, F f)
|
||||
{
|
||||
return result_of::iter_fold<Seq const,State,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,380 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<typename State, typename It, typename F>
|
||||
struct reverse_fold_lvalue_state
|
||||
: boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename add_const<State>::type>::type,
|
||||
typename fusion::result_of::deref<It>::type)
|
||||
>
|
||||
{};
|
||||
template<typename Result,int N>
|
||||
struct unrolled_reverse_fold
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It0 const
|
||||
>::type
|
||||
It1;
|
||||
It1 it1 = fusion::prior(it0);
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It1
|
||||
>::type
|
||||
It2;
|
||||
It2 it2 = fusion::prior(it1);
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It2
|
||||
>::type
|
||||
It3;
|
||||
It3 it3 = fusion::prior(it2);
|
||||
typedef typename reverse_fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,fusion::deref(it0));
|
||||
typedef typename reverse_fold_lvalue_state<State1,It1,F>::type State2;
|
||||
State2 const state2=f(state1,fusion::deref(it1));
|
||||
typedef typename reverse_fold_lvalue_state<State2,It2,F>::type State3;
|
||||
State3 const state3=f(state2,fusion::deref(it2));
|
||||
return unrolled_reverse_fold<
|
||||
Result
|
||||
, N-4
|
||||
>::call(
|
||||
f(state3,fusion::deref(it3)),
|
||||
fusion::prior(it3),
|
||||
f);
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_reverse_fold<Result,3>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It0 const
|
||||
>::type
|
||||
It1;
|
||||
It1 it1 = fusion::prior(it0);
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It1
|
||||
>::type
|
||||
It2;
|
||||
It2 it2 = fusion::prior(it1);
|
||||
typedef typename reverse_fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,fusion::deref(it0));
|
||||
typedef typename reverse_fold_lvalue_state<State1,It1,F>::type State2;
|
||||
State2 const state2=f(state1,fusion::deref(it1));
|
||||
return f(state2,fusion::deref(it2));
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_reverse_fold<Result,2>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename reverse_fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,fusion::deref(it0));
|
||||
return f(
|
||||
state1,
|
||||
fusion::deref( fusion::prior(it0)));
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_reverse_fold<Result,1>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
return f(state,
|
||||
fusion::deref(it0));
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_reverse_fold<Result,0>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0, F)
|
||||
{
|
||||
return static_cast<Result>(state);
|
||||
}
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F, int N>
|
||||
struct result_of_unrolled_reverse_fold
|
||||
{
|
||||
typedef typename
|
||||
reverse_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
rest1;
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It0 const
|
||||
>::type
|
||||
it1;
|
||||
typedef typename
|
||||
reverse_fold_lvalue_state<
|
||||
rest1
|
||||
, it1
|
||||
, F
|
||||
>::type
|
||||
rest2;
|
||||
typedef typename
|
||||
result_of::prior<it1>::type
|
||||
it2;
|
||||
typedef typename
|
||||
reverse_fold_lvalue_state<
|
||||
rest2
|
||||
, it2
|
||||
, F
|
||||
>::type
|
||||
rest3;
|
||||
typedef typename
|
||||
result_of::prior<it2>::type
|
||||
it3;
|
||||
typedef typename
|
||||
result_of_unrolled_reverse_fold<
|
||||
typename reverse_fold_lvalue_state<
|
||||
rest3
|
||||
, it3
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::prior<
|
||||
it3
|
||||
>::type
|
||||
, F
|
||||
, N-4
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_reverse_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 3
|
||||
>
|
||||
{
|
||||
typedef typename
|
||||
reverse_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
rest1;
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It0 const
|
||||
>::type
|
||||
it1;
|
||||
typedef typename
|
||||
reverse_fold_lvalue_state<
|
||||
typename reverse_fold_lvalue_state<
|
||||
rest1
|
||||
, it1
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::prior<
|
||||
it1 const
|
||||
>::type const
|
||||
, F
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_reverse_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 2
|
||||
>
|
||||
: reverse_fold_lvalue_state<
|
||||
typename reverse_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::prior<
|
||||
It0 const
|
||||
>::type const
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_reverse_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 1
|
||||
>
|
||||
: reverse_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_reverse_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 0
|
||||
>
|
||||
{
|
||||
typedef StateRef type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F, int SeqSize>
|
||||
struct result_of_first_unrolledreverse_fold
|
||||
{
|
||||
typedef typename
|
||||
result_of_unrolled_reverse_fold<
|
||||
typename boost::result_of<
|
||||
F(
|
||||
StateRef,
|
||||
typename fusion::result_of::deref< It0 const>::type
|
||||
)
|
||||
>::type
|
||||
, typename result_of::prior<
|
||||
It0 const
|
||||
>::type
|
||||
, F
|
||||
, SeqSize-1
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<int SeqSize, typename StateRef, typename Seq, typename F>
|
||||
struct reverse_fold_impl
|
||||
{
|
||||
typedef typename
|
||||
result_of_first_unrolledreverse_fold<
|
||||
StateRef
|
||||
, typename fusion::result_of::prior< typename result_of::end<Seq>::type >::type
|
||||
, F
|
||||
, SeqSize
|
||||
>::type
|
||||
type;
|
||||
static type
|
||||
call(StateRef state, Seq& seq, F f)
|
||||
{
|
||||
typedef
|
||||
unrolled_reverse_fold<
|
||||
type
|
||||
, SeqSize
|
||||
>
|
||||
unrolled_impl;
|
||||
return unrolled_impl::call(
|
||||
state,
|
||||
fusion::prior( fusion::end(seq)),
|
||||
f);
|
||||
}
|
||||
};
|
||||
template<typename StateRef, typename Seq, typename F>
|
||||
struct reverse_fold_impl<0,StateRef,Seq,F>
|
||||
{
|
||||
typedef StateRef type;
|
||||
static StateRef
|
||||
call(StateRef state, Seq&, F)
|
||||
{
|
||||
return static_cast<StateRef>(state);
|
||||
}
|
||||
};
|
||||
template<typename Seq, typename State, typename F, bool IsSegmented>
|
||||
struct result_of_reverse_fold
|
||||
: reverse_fold_impl<
|
||||
result_of::size<Seq>::value
|
||||
, typename add_reference<
|
||||
typename add_const<State>::type
|
||||
>::type
|
||||
, Seq
|
||||
, F
|
||||
>
|
||||
{};
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct reverse_fold
|
||||
: detail::result_of_reverse_fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
, traits::is_segmented<Seq>::type::value
|
||||
>
|
||||
{};
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq& seq, State const& state, F f)
|
||||
{
|
||||
return result_of::reverse_fold<Seq,State const,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq const& seq, State const& state, F f)
|
||||
{
|
||||
return result_of::reverse_fold<Seq const,State const,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq& seq, State& state, F f)
|
||||
{
|
||||
return result_of::reverse_fold<Seq,State,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::reverse_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq const& seq, State& state, F f)
|
||||
{
|
||||
return result_of::reverse_fold<Seq const,State,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,380 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<typename State, typename It, typename F>
|
||||
struct reverse_iter_fold_lvalue_state
|
||||
: boost::result_of<
|
||||
F(
|
||||
typename add_reference<typename add_const<State>::type>::type,
|
||||
It&)
|
||||
>
|
||||
{};
|
||||
template<typename Result,int N>
|
||||
struct unrolled_reverse_iter_fold
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It0 const
|
||||
>::type
|
||||
It1;
|
||||
It1 it1 = fusion::prior(it0);
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It1
|
||||
>::type
|
||||
It2;
|
||||
It2 it2 = fusion::prior(it1);
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It2
|
||||
>::type
|
||||
It3;
|
||||
It3 it3 = fusion::prior(it2);
|
||||
typedef typename reverse_iter_fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,it0);
|
||||
typedef typename reverse_iter_fold_lvalue_state<State1,It1,F>::type State2;
|
||||
State2 const state2=f(state1,it1);
|
||||
typedef typename reverse_iter_fold_lvalue_state<State2,It2,F>::type State3;
|
||||
State3 const state3=f(state2,it2);
|
||||
return unrolled_reverse_iter_fold<
|
||||
Result
|
||||
, N-4
|
||||
>::call(
|
||||
f(state3,it3),
|
||||
fusion::prior(it3),
|
||||
f);
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_reverse_iter_fold<Result,3>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It0 const
|
||||
>::type
|
||||
It1;
|
||||
It1 it1 = fusion::prior(it0);
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It1
|
||||
>::type
|
||||
It2;
|
||||
It2 it2 = fusion::prior(it1);
|
||||
typedef typename reverse_iter_fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,it0);
|
||||
typedef typename reverse_iter_fold_lvalue_state<State1,It1,F>::type State2;
|
||||
State2 const state2=f(state1,it1);
|
||||
return f(state2,it2);
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_reverse_iter_fold<Result,2>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
typedef typename reverse_iter_fold_lvalue_state<State,It0,F>::type State1;
|
||||
State1 const state1=f(state,it0);
|
||||
return f(
|
||||
state1,
|
||||
fusion::prior(it0));
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_reverse_iter_fold<Result,1>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0,F f)
|
||||
{
|
||||
return f(state,
|
||||
it0);
|
||||
}
|
||||
};
|
||||
template<typename Result>
|
||||
struct unrolled_reverse_iter_fold<Result,0>
|
||||
{
|
||||
template<typename State, typename It0, typename F>
|
||||
static Result
|
||||
call(State const& state,It0 const& it0, F)
|
||||
{
|
||||
return static_cast<Result>(state);
|
||||
}
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F, int N>
|
||||
struct result_of_unrolled_reverse_iter_fold
|
||||
{
|
||||
typedef typename
|
||||
reverse_iter_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
rest1;
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It0 const
|
||||
>::type
|
||||
it1;
|
||||
typedef typename
|
||||
reverse_iter_fold_lvalue_state<
|
||||
rest1
|
||||
, it1
|
||||
, F
|
||||
>::type
|
||||
rest2;
|
||||
typedef typename
|
||||
result_of::prior<it1>::type
|
||||
it2;
|
||||
typedef typename
|
||||
reverse_iter_fold_lvalue_state<
|
||||
rest2
|
||||
, it2
|
||||
, F
|
||||
>::type
|
||||
rest3;
|
||||
typedef typename
|
||||
result_of::prior<it2>::type
|
||||
it3;
|
||||
typedef typename
|
||||
result_of_unrolled_reverse_iter_fold<
|
||||
typename reverse_iter_fold_lvalue_state<
|
||||
rest3
|
||||
, it3
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::prior<
|
||||
it3
|
||||
>::type
|
||||
, F
|
||||
, N-4
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_reverse_iter_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 3
|
||||
>
|
||||
{
|
||||
typedef typename
|
||||
reverse_iter_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
rest1;
|
||||
typedef typename
|
||||
result_of::prior<
|
||||
It0 const
|
||||
>::type
|
||||
it1;
|
||||
typedef typename
|
||||
reverse_iter_fold_lvalue_state<
|
||||
typename reverse_iter_fold_lvalue_state<
|
||||
rest1
|
||||
, it1
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::prior<
|
||||
it1 const
|
||||
>::type const
|
||||
, F
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_reverse_iter_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 2
|
||||
>
|
||||
: reverse_iter_fold_lvalue_state<
|
||||
typename reverse_iter_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>::type
|
||||
, typename result_of::prior<
|
||||
It0 const
|
||||
>::type const
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_reverse_iter_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 1
|
||||
>
|
||||
: reverse_iter_fold_lvalue_state<
|
||||
StateRef
|
||||
, It0 const
|
||||
, F
|
||||
>
|
||||
{};
|
||||
template<typename StateRef, typename It0, typename F>
|
||||
struct result_of_unrolled_reverse_iter_fold<
|
||||
StateRef
|
||||
, It0
|
||||
, F
|
||||
, 0
|
||||
>
|
||||
{
|
||||
typedef StateRef type;
|
||||
};
|
||||
template<typename StateRef, typename It0, typename F, int SeqSize>
|
||||
struct result_of_first_unrolledreverse_iter_fold
|
||||
{
|
||||
typedef typename
|
||||
result_of_unrolled_reverse_iter_fold<
|
||||
typename boost::result_of<
|
||||
F(
|
||||
StateRef,
|
||||
It0 const&
|
||||
)
|
||||
>::type
|
||||
, typename result_of::prior<
|
||||
It0 const
|
||||
>::type
|
||||
, F
|
||||
, SeqSize-1
|
||||
>::type
|
||||
type;
|
||||
};
|
||||
template<int SeqSize, typename StateRef, typename Seq, typename F>
|
||||
struct reverse_iter_fold_impl
|
||||
{
|
||||
typedef typename
|
||||
result_of_first_unrolledreverse_iter_fold<
|
||||
StateRef
|
||||
, typename fusion::result_of::prior< typename result_of::end<Seq>::type >::type
|
||||
, F
|
||||
, SeqSize
|
||||
>::type
|
||||
type;
|
||||
static type
|
||||
call(StateRef state, Seq& seq, F f)
|
||||
{
|
||||
typedef
|
||||
unrolled_reverse_iter_fold<
|
||||
type
|
||||
, SeqSize
|
||||
>
|
||||
unrolled_impl;
|
||||
return unrolled_impl::call(
|
||||
state,
|
||||
fusion::prior( fusion::end(seq)),
|
||||
f);
|
||||
}
|
||||
};
|
||||
template<typename StateRef, typename Seq, typename F>
|
||||
struct reverse_iter_fold_impl<0,StateRef,Seq,F>
|
||||
{
|
||||
typedef StateRef type;
|
||||
static StateRef
|
||||
call(StateRef state, Seq&, F)
|
||||
{
|
||||
return static_cast<StateRef>(state);
|
||||
}
|
||||
};
|
||||
template<typename Seq, typename State, typename F, bool IsSegmented>
|
||||
struct result_of_reverse_iter_fold
|
||||
: reverse_iter_fold_impl<
|
||||
result_of::size<Seq>::value
|
||||
, typename add_reference<
|
||||
typename add_const<State>::type
|
||||
>::type
|
||||
, Seq
|
||||
, F
|
||||
>
|
||||
{};
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct reverse_iter_fold
|
||||
: detail::result_of_reverse_iter_fold<
|
||||
Seq
|
||||
, State
|
||||
, F
|
||||
, traits::is_segmented<Seq>::type::value
|
||||
>
|
||||
{};
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq& seq, State const& state, F f)
|
||||
{
|
||||
return result_of::reverse_iter_fold<Seq,State const,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq const& seq, State const& state, F f)
|
||||
{
|
||||
return result_of::reverse_iter_fold<Seq const,State const,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq& seq, State& state, F f)
|
||||
{
|
||||
return result_of::reverse_iter_fold<Seq,State,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
template<typename Seq, typename State, typename F>
|
||||
inline typename result_of::reverse_iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq const& seq, State& state, F f)
|
||||
{
|
||||
return result_of::reverse_iter_fold<Seq const,State,F>::call(
|
||||
state,
|
||||
seq,
|
||||
f);
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*=============================================================================
|
||||
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_FOLD_S_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_FOLD_S_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/fold_fwd.hpp>
|
||||
#include <boost/fusion/support/segmented_fold_until.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <typename Fun>
|
||||
struct segmented_fold_fun
|
||||
{
|
||||
explicit segmented_fold_fun(Fun const& f)
|
||||
: fun(f)
|
||||
{}
|
||||
|
||||
Fun const& fun;
|
||||
|
||||
template <typename Sequence, typename State, typename Context>
|
||||
struct apply
|
||||
{
|
||||
typedef typename result_of::fold<Sequence, State, Fun>::type type;
|
||||
typedef mpl::true_ continue_type;
|
||||
|
||||
static type call(Sequence& seq, State const& state, Context const&, segmented_fold_fun const& fun)
|
||||
{
|
||||
return fusion::fold(seq, state, fun.fun);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// The default implementation of this lives in detail/fold.hpp
|
||||
template <typename Sequence, typename State, typename Fun, bool IsSegmented>
|
||||
struct result_of_fold;
|
||||
|
||||
template <typename Sequence, typename State, typename Fun>
|
||||
struct result_of_fold<Sequence, State, Fun, true>
|
||||
{
|
||||
typedef
|
||||
typename result_of::segmented_fold_until<
|
||||
Sequence,
|
||||
State,
|
||||
segmented_fold_fun<Fun>
|
||||
>::type
|
||||
type;
|
||||
|
||||
static type call(State& state, Sequence& seq, Fun fun)
|
||||
{
|
||||
return fusion::segmented_fold_until(seq, state, segmented_fold_fun<Fun>(fun));
|
||||
}
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,48 @@
|
||||
/*=============================================================================
|
||||
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_FOR_EACH_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_SEGMENTED_FOR_EACH_HPP_INCLUDED
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/fusion/support/void.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/for_each_fwd.hpp>
|
||||
#include <boost/fusion/support/segmented_fold_until.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <typename Fun>
|
||||
struct segmented_for_each_fun
|
||||
{
|
||||
explicit segmented_for_each_fun(Fun const& f)
|
||||
: fun(f)
|
||||
{}
|
||||
|
||||
Fun const& fun;
|
||||
|
||||
template <typename Sequence, typename State, typename Context>
|
||||
struct apply
|
||||
{
|
||||
typedef void_ type;
|
||||
typedef mpl::true_ continue_type;
|
||||
|
||||
static type call(Sequence& seq, State const&, Context const&, segmented_for_each_fun const& fun)
|
||||
{
|
||||
fusion::for_each(seq, fun.fun);
|
||||
return void_();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
inline void
|
||||
for_each(Sequence& seq, F const& f, mpl::true_) // segmented implementation
|
||||
{
|
||||
fusion::segmented_fold_until(seq, void_(), segmented_for_each_fun<F>(f));
|
||||
}
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -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
|
||||
@@ -1,15 +1,63 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2007 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
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_ALGORITHM_ITERATION_FOLD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_FOLD_HPP
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/fold_fwd.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/empty.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||
#include <boost/fusion/algorithm/iteration/detail/preprocessed/fold.hpp>
|
||||
#else
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/fold.hpp")
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/segmented_fold.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_FOLD_FWD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_FOLD_FWD_HPP
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct fold;
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq const& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq& seq, State& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
fold(Seq const& seq, State& state, F f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -9,11 +9,11 @@
|
||||
#define BOOST_FUSION_FOR_EACH_20070527_0943
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/for_each.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
|
||||
#include <boost/fusion/support/category_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename F>
|
||||
@@ -23,20 +23,18 @@ namespace boost { namespace fusion {
|
||||
};
|
||||
}
|
||||
|
||||
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());
|
||||
detail::for_each(seq, f, typename traits::is_segmented<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());
|
||||
detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());
|
||||
}
|
||||
}}
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*=============================================================================
|
||||
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_FOR_EACH_FWD_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_FOR_EACH_FWD_HPP_INCLUDED
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Sequence, typename F>
|
||||
struct for_each;
|
||||
}
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
void
|
||||
for_each(Sequence& seq, F const& f);
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
void
|
||||
for_each(Sequence const& seq, F const& f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,6 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
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)
|
||||
@@ -8,10 +9,56 @@
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_ITER_FOLD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_ITER_FOLD_HPP
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/iter_fold_fwd.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/empty.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
#define BOOST_FUSION_ITER_FOLD
|
||||
|
||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||
#include <boost/fusion/algorithm/iteration/detail/preprocessed/iter_fold.hpp>
|
||||
#else
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/iter_fold.hpp")
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
||||
|
||||
#undef BOOST_FUSION_ITER_FOLD
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_ITER_FOLD_FWD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_ITER_FOLD_FWD_HPP
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct iter_fold;
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq const& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq& seq, State& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
iter_fold(Seq const& seq, State& state, F f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,6 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
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)
|
||||
@@ -8,10 +9,56 @@
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_HPP
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/reverse_fold_fwd.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/empty.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
#define BOOST_FUSION_REVERSE_FOLD
|
||||
|
||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||
#include <boost/fusion/algorithm/iteration/detail/preprocessed/reverse_fold.hpp>
|
||||
#else
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/reverse_fold.hpp")
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
||||
|
||||
#undef BOOST_FUSION_REVERSE_FOLD
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_FWD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_FOLD_FWD_HPP
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct reverse_fold;
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::reverse_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::reverse_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq const& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::reverse_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq& seq, State& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::reverse_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_fold(Seq const& seq, State& state, F f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -1,18 +1,64 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_HPP
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/reverse_iter_fold_fwd.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/empty.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
#include <boost/fusion/iterator/equal_to.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
#include <boost/fusion/iterator/prior.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/utility/result_of.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
#define BOOST_FUSION_REVERSE_FOLD
|
||||
#define BOOST_FUSION_ITER_FOLD
|
||||
|
||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||
#include <boost/fusion/algorithm/iteration/detail/preprocessed/reverse_iter_fold.hpp>
|
||||
#else
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/reverse_iter_fold.hpp")
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
Copyright (c) 2010 Christopher Schmidt
|
||||
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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#endif
|
||||
|
||||
#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
||||
|
||||
#undef BOOST_FUSION_REVERSE_FOLD
|
||||
#undef BOOST_FUSION_ITER_FOLD
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_FWD_HPP
|
||||
#define BOOST_FUSION_ALGORITHM_ITERATION_REVERSE_ITER_FOLD_FWD_HPP
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace result_of
|
||||
{
|
||||
template<typename Seq, typename State, typename F>
|
||||
struct reverse_iter_fold;
|
||||
}
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::reverse_iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::reverse_iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq const& seq, State const& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::reverse_iter_fold<
|
||||
Seq
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq& seq, State& state, F f);
|
||||
|
||||
template<typename Seq, typename State, typename F>
|
||||
typename result_of::reverse_iter_fold<
|
||||
Seq const
|
||||
, State const
|
||||
, F
|
||||
>::type
|
||||
reverse_iter_fold(Seq const& seq, State& state, F f);
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005 Eric Niebler
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2007
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2006 Joel de Guzman
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005 Eric Niebler
|
||||
Copyright (c) 2007 Dan Marsden
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user