merge from trunk

[SVN r56178]
This commit is contained in:
Joel de Guzman
2009-09-14 07:40:39 +00:00
parent ea5ea7f001
commit 2f8b91828b
22 changed files with 295 additions and 51 deletions

View File

@ -12,6 +12,7 @@
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/mpl/minus.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/type_traits/is_const.hpp>
namespace boost { namespace fusion {

View File

@ -1,7 +1,7 @@
/*=============================================================================
Copyright (c) 2001-2006 Joel de Guzman
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)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
@ -19,7 +19,7 @@
namespace boost { namespace fusion
{
struct void_;
namespace result_of
{
template <
@ -28,18 +28,18 @@ namespace boost { namespace fusion
, typename Extra = void_
>
struct make_vector;
template <>
struct make_vector<>
{
typedef vector<> type;
typedef vector0<> type;
};
}
inline vector<>
inline vector0<>
make_vector()
{
return vector<>();
return vector0<>();
}
#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
@ -74,15 +74,15 @@ namespace boost { namespace fusion
struct make_vector<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef vector<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
};
}
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
inline vector<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
inline BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
make_vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
{
return vector<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
return BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
BOOST_PP_ENUM_PARAMS(N, _));
}

View File

@ -31,14 +31,14 @@ namespace boost { namespace fusion { namespace detail
template <typename Iterator>
struct apply
{
typedef vector<> type;
typedef vector0<> type;
};
template <typename Iterator>
static typename apply<Iterator>::type
call(Iterator)
{
return vector<>();
return vector0<>();
}
};
@ -82,7 +82,7 @@ namespace boost { namespace fusion { namespace detail
{
BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
typedef vector<BOOST_PP_ENUM_PARAMS(N, T)> type;
typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> type;
};
template <typename Iterator>

View File

@ -48,7 +48,7 @@ namespace boost { namespace fusion { namespace detail
template <>
struct vector_n_chooser<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, void_ BOOST_PP_INTERCEPT)>
{
typedef vector0 type;
typedef vector0<> type;
};
#define BOOST_PP_FILENAME_1 \

View File

@ -56,7 +56,7 @@ namespace boost { namespace fusion
template <typename Sequence>
vector(Sequence const& rhs)
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1500)
: vec(ctor_helper(rhs, is_base_of<vector, Sequence>())) {}
#else
: vec(rhs) {}
@ -129,7 +129,7 @@ namespace boost { namespace fusion
private:
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1400)
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1500)
static vector_n const&
ctor_helper(vector const& rhs, mpl::true_)
{

View File

@ -39,7 +39,8 @@ namespace boost { namespace fusion
struct fusion_sequence_tag;
struct random_access_traversal_tag;
struct vector0 : sequence_base<vector0>
template <typename Dummy = void>
struct vector0 : sequence_base<vector0<Dummy> >
{
typedef mpl::vector0<> types;
typedef vector_tag fusion_tag;

View File

@ -7,6 +7,11 @@
#if !defined(FUSION_VECTOR_ITERATOR_05042005_0635)
#define FUSION_VECTOR_ITERATOR_05042005_0635
#if defined (BOOST_MSVC)
# pragma warning(push)
# pragma warning (disable: 4512) // assignment operator could not be generated.
#endif
#include <boost/fusion/support/iterator_base.hpp>
#include <boost/fusion/container/vector/detail/deref_impl.hpp>
#include <boost/fusion/container/vector/detail/value_of_impl.hpp>
@ -42,5 +47,9 @@ namespace boost { namespace fusion
};
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif