merge [70965] [73644] [73668] [73669] [73683] [73770] [73771] [73831] [73834] [73854] [73892] [73898] [73899] [73906] [73908] [73927] [74019] [74048] [74113] from trunk to release

[SVN r74325]
This commit is contained in:
Eric Niebler
2011-09-09 03:27:28 +00:00
139 changed files with 3858 additions and 2176 deletions

View File

@ -1,130 +0,0 @@
/*=============================================================================
Copyright (c) 2006 Eric Niebler
Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef FUSION_BINARY_TREE_EAN_05032006_1027
#define FUSION_BINARY_TREE_EAN_05032006_1027
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/fusion/sequence/intrinsic/at.hpp>
#include <boost/fusion/view/single_view.hpp>
#include <boost/fusion/container/list/cons.hpp> // for nil
#include <boost/fusion/container/vector/vector10.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/sequence/intrinsic/ext_/segments.hpp>
#include <boost/fusion/support/ext_/is_segmented.hpp>
#include <boost/fusion/view/ext_/segmented_iterator.hpp>
namespace boost { namespace fusion
{
struct tree_tag;
namespace detail
{
template<typename T, bool IsConst>
struct reference : add_reference<T> {};
template<typename T>
struct reference<T, true> : reference<typename add_const<T>::type, false> {};
template<typename T>
struct reference<T &, true> : reference<T, false> {};
}
template<typename Data, typename Left = nil, typename Right = nil>
struct tree
: sequence_base<tree<Data, Left, Right> >
{
typedef Data data_type;
typedef Left left_type;
typedef Right right_type;
typedef tree_tag fusion_tag;
typedef forward_traversal_tag category;
typedef mpl::false_ is_view;
typedef typename mpl::if_<
traits::is_sequence<Data>
, Data
, single_view<Data>
>::type data_view;
explicit tree(
typename fusion::detail::call_param<Data>::type data_
, typename fusion::detail::call_param<Left>::type left_ = Left()
, typename fusion::detail::call_param<Right>::type right_ = Right()
)
: segments(left_, data_view(data_), right_)
{}
typedef vector3<Left, data_view, Right> segments_type;
segments_type segments;
};
template<typename Data>
tree<Data> make_tree(Data const &data)
{
return tree<Data>(data);
}
template<typename Data, typename Left, typename Right>
tree<Data, Left, Right> make_tree(Data const &data, Left const &left, Right const &right)
{
return tree<Data, Left, Right>(data, left, right);
}
namespace extension
{
template<>
struct is_segmented_impl<tree_tag>
{
template<typename Sequence>
struct apply : mpl::true_ {};
};
template<>
struct segments_impl<tree_tag>
{
template<typename Sequence>
struct apply
{
typedef typename mpl::if_<
is_const<Sequence>
, typename Sequence::segments_type const &
, typename Sequence::segments_type &
>::type type;
static type call(Sequence &seq)
{
return seq.segments;
}
};
};
template<>
struct begin_impl<tree_tag>
{
template<typename Sequence>
struct apply
: segmented_begin<Sequence>
{};
};
template<>
struct end_impl<tree_tag>
{
template<typename Sequence>
struct apply
: segmented_end<Sequence>
{};
};
}
}}
#endif

View File

@ -8,6 +8,7 @@
#if !defined(FUSION_CONS_07172005_0843)
#define FUSION_CONS_07172005_0843
#include <boost/fusion/container/list/cons_fwd.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
@ -55,7 +56,7 @@ namespace boost { namespace fusion
}
};
template <typename Car, typename Cdr = nil>
template <typename Car, typename Cdr /*= nil*/>
struct cons : sequence_base<cons<Car, Cdr> >
{
typedef mpl::int_<Cdr::size::value+1> size;

View File

@ -0,0 +1,20 @@
/*=============================================================================
Copyright (c) 2005 Joel de Guzman
Copyright (c) 2005 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_CONS_FWD_HPP_INCLUDED)
#define BOOST_FUSION_CONS_FWD_HPP_INCLUDED
namespace boost { namespace fusion
{
struct nil;
template <typename Car, typename Cdr = nil>
struct cons;
}}
#endif

View File

@ -0,0 +1,43 @@
/*=============================================================================
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_REVERSE_CONS_HPP_INCLUDED)
#define BOOST_FUSION_REVERSE_CONS_HPP_INCLUDED
#include <boost/fusion/container/list/cons_fwd.hpp>
namespace boost { namespace fusion { namespace detail
{
////////////////////////////////////////////////////////////////////////////
template<typename Cons, typename State = nil>
struct reverse_cons;
template<typename Car, typename Cdr, typename State>
struct reverse_cons<cons<Car, Cdr>, State>
{
typedef reverse_cons<Cdr, cons<Car, State> > impl;
typedef typename impl::type type;
static type call(cons<Car, Cdr> const &cons, State const &state = State())
{
typedef fusion::cons<Car, State> cdr_type;
return impl::call(cons.cdr, cdr_type(cons.car, state));
}
};
template<typename State>
struct reverse_cons<nil, State>
{
typedef State type;
static State const &call(nil const &, State const &state = State())
{
return state;
}
};
}}}
#endif

View File

@ -7,6 +7,7 @@
#if !defined(FUSION_VECTOR10_05042005_0257)
#define FUSION_VECTOR10_05042005_0257
#include <boost/fusion/container/vector/vector10_fwd.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/iterator/next.hpp>
@ -39,7 +40,7 @@ namespace boost { namespace fusion
struct fusion_sequence_tag;
struct random_access_traversal_tag;
template <typename Dummy = void>
template <typename Dummy>
struct vector0 : sequence_base<vector0<Dummy> >
{
typedef mpl::vector0<> types;

View File

@ -0,0 +1,34 @@
#ifndef BOOST_PP_IS_ITERATING
/*=============================================================================
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_VECTOR10_FWD_HPP_INCLUDED)
#define BOOST_FUSION_VECTOR10_FWD_HPP_INCLUDED
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
namespace boost { namespace fusion
{
template <typename Dummy = void>
struct vector0;
// expand vector1 to vector10
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/vector10_fwd.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, 10)
#include BOOST_PP_ITERATE()
}}
#endif
#else
template <BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename T)>
struct BOOST_PP_CAT(vector, BOOST_PP_ITERATION());
#endif

View File

@ -7,6 +7,7 @@
#if !defined(FUSION_VECTOR20_05052005_0205)
#define FUSION_VECTOR20_05052005_0205
#include <boost/fusion/container/vector/vector20_fwd.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/iterator/next.hpp>

View File

@ -0,0 +1,31 @@
#ifndef BOOST_PP_IS_ITERATING
/*=============================================================================
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_VECTOR20_FWD_HPP_INCLUDED)
#define BOOST_FUSION_VECTOR20_FWD_HPP_INCLUDED
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
namespace boost { namespace fusion
{
// expand vector11 to vector20
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/vector20_fwd.hpp>
#define BOOST_PP_ITERATION_LIMITS (11, 20)
#include BOOST_PP_ITERATE()
}}
#endif
#else
template <BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename T)>
struct BOOST_PP_CAT(vector, BOOST_PP_ITERATION());
#endif

View File

@ -7,6 +7,7 @@
#if !defined(FUSION_VECTOR30_05052005_0206)
#define FUSION_VECTOR30_05052005_0206
#include <boost/fusion/container/vector/vector30_fwd.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/iterator/next.hpp>

View File

@ -0,0 +1,31 @@
#ifndef BOOST_PP_IS_ITERATING
/*=============================================================================
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_VECTOR30_FWD_HPP_INCLUDED)
#define BOOST_FUSION_VECTOR30_FWD_HPP_INCLUDED
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
namespace boost { namespace fusion
{
// expand vector21 to vector30
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/vector30_fwd.hpp>
#define BOOST_PP_ITERATION_LIMITS (21, 30)
#include BOOST_PP_ITERATE()
}}
#endif
#else
template <BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename T)>
struct BOOST_PP_CAT(vector, BOOST_PP_ITERATION());
#endif

View File

@ -7,6 +7,7 @@
#if !defined(FUSION_VECTOR40_05052005_0208)
#define FUSION_VECTOR40_05052005_0208
#include <boost/fusion/container/vector/vector40_fwd.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/iterator/next.hpp>

View File

@ -0,0 +1,31 @@
#ifndef BOOST_PP_IS_ITERATING
/*=============================================================================
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_VECTOR40_FWD_HPP_INCLUDED)
#define BOOST_FUSION_VECTOR40_FWD_HPP_INCLUDED
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
namespace boost { namespace fusion
{
// expand vector31 to vector40
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/vector40_fwd.hpp>
#define BOOST_PP_ITERATION_LIMITS (31, 40)
#include BOOST_PP_ITERATE()
}}
#endif
#else
template <BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename T)>
struct BOOST_PP_CAT(vector, BOOST_PP_ITERATION());
#endif

View File

@ -7,6 +7,7 @@
#if !defined(FUSION_VECTOR50_05052005_0207)
#define FUSION_VECTOR50_05052005_0207
#include <boost/fusion/container/vector/vector50_fwd.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/iterator/next.hpp>

View File

@ -0,0 +1,31 @@
#ifndef BOOST_PP_IS_ITERATING
/*=============================================================================
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_VECTOR50_FWD_HPP_INCLUDED)
#define BOOST_FUSION_VECTOR50_FWD_HPP_INCLUDED
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/iteration/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
namespace boost { namespace fusion
{
// expand vector41 to vector50
#define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/vector50_fwd.hpp>
#define BOOST_PP_ITERATION_LIMITS (41, 50)
#include BOOST_PP_ITERATE()
}}
#endif
#else
template <BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), typename T)>
struct BOOST_PP_CAT(vector, BOOST_PP_ITERATION());
#endif

View File

@ -10,6 +10,11 @@
#include <boost/fusion/container/vector/limits.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/fusion/container/vector/vector10_fwd.hpp>
#include <boost/fusion/container/vector/vector20_fwd.hpp>
#include <boost/fusion/container/vector/vector30_fwd.hpp>
#include <boost/fusion/container/vector/vector40_fwd.hpp>
#include <boost/fusion/container/vector/vector50_fwd.hpp>
namespace boost { namespace fusion
{