big merge from trunk

[SVN r85669]
This commit is contained in:
Joel de Guzman
2013-09-15 06:27:58 +00:00
151 changed files with 2267 additions and 827 deletions

View File

@ -18,7 +18,7 @@
// The std_tuple_iterator adaptor only supports implementations // The std_tuple_iterator adaptor only supports implementations
// using variadic templates // using variadic templates
#if !defined(BOOST_NO_VARIADIC_TEMPLATES) #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#include <boost/fusion/adapted/std_tuple.hpp> #include <boost/fusion/adapted/std_tuple.hpp>
#endif #endif

View File

@ -36,7 +36,7 @@
// an alternate implementation for these metafunctions is used that does not // an alternate implementation for these metafunctions is used that does not
// require such specializations. The alternate implementation takes longer // require such specializations. The alternate implementation takes longer
// to compile so its use is restricted to the offending compilers. // to compile so its use is restricted to the offending compilers.
// For MSVC, the bug was reported at https://connect.microsoft.com/VisualStudio/feedback/details/757891/c-compiler-error-involving-partial-specializations-of-nested-templates // For MSVC, the bug was was reported at https://connect.microsoft.com/VisualStudio/feedback/details/757891/c-compiler-error-involving-partial-specializations-of-nested-templates
// For GCC, 4.4 and earlier are no longer maintained so there is no need // For GCC, 4.4 and earlier are no longer maintained so there is no need
// to report a bug. // to report a bug.
#if defined(BOOST_MSVC) || (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 4))) #if defined(BOOST_MSVC) || (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 4)))

View File

@ -69,7 +69,7 @@ namespace boost { namespace fusion
copy(Seq1 const& src, Seq2& dest) copy(Seq1 const& src, Seq2& dest)
{ {
BOOST_STATIC_ASSERT( BOOST_STATIC_ASSERT(
result_of::size<Seq1>::value == result_of::size<Seq2>::value); result_of::size<Seq1>::value <= result_of::size<Seq2>::value);
detail::sequence_copy< detail::sequence_copy<
Seq1 const, Seq2>:: Seq1 const, Seq2>::

View File

@ -0,0 +1,84 @@
/*=============================================================================
Copyright (c) 2001-2013 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_MOVE_01192013_2225)
#define FUSION_MOVE_01192013_2225
#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/fusion/support/is_sequence.hpp>
#include <boost/config.hpp>
#include <boost/static_assert.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/ice.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_move
{
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 = std::move(*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
typename
enable_if_c<
type_traits::ice_and<
traits::is_sequence<Seq1>::value
, traits::is_sequence<Seq2>::value
>::value,
void
>::type
move(Seq1&& src, Seq2& dest)
{
BOOST_STATIC_ASSERT(
result_of::size<Seq1>::value <= result_of::size<Seq2>::value);
detail::sequence_move<
Seq1, Seq2>::
call(fusion::begin(src), fusion::begin(dest));
}
}}
#if defined (BOOST_MSVC)
# pragma warning(pop)
#endif
#endif

View File

@ -8,6 +8,7 @@
#if !defined(BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036) #if !defined(BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036)
#define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036 #define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036
#include <boost/fusion/container/deque/deque_fwd.hpp>
#include <boost/fusion/container/deque/deque.hpp> #include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/container/deque/convert.hpp> #include <boost/fusion/container/deque/convert.hpp>

View File

@ -31,7 +31,7 @@ namespace boost { namespace fusion
: base(val, deque) : base(val, deque)
{} {}
#if defined(BOOST_NO_RVALUE_REFERENCES) #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename Arg> template <typename Arg>
back_extended_deque(Deque const& deque, Arg& val) back_extended_deque(Deque const& deque, Arg& val)
: base(val, deque) : base(val, deque)

View File

@ -1,5 +1,5 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2005-2012 Joel de Guzman Copyright (c) 2005-2013 Joel de Guzman
Copyright (c) 2006 Dan Marsden Copyright (c) 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
@ -8,25 +8,32 @@
#if !defined(FUSION_CONVERT_20061213_2207) #if !defined(FUSION_CONVERT_20061213_2207)
#define FUSION_CONVERT_20061213_2207 #define FUSION_CONVERT_20061213_2207
#include <boost/fusion/container/deque/detail/as_deque.hpp>
#include <boost/fusion/container/deque/detail/convert_impl.hpp> #include <boost/fusion/container/deque/detail/convert_impl.hpp>
#include <boost/fusion/container/deque/deque.hpp> #include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> #if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
///////////////////////////////////////////////////////////////////////////////
// C++03 (non-variadic) implementation
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/container/deque/detail/cpp03/build_deque.hpp>
#else
///////////////////////////////////////////////////////////////////////////////
// C++11 variadic implementation
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/container/deque/detail/build_deque.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
namespace result_of namespace result_of
{ {
template <typename Sequence> template <typename Sequence>
struct as_deque struct as_deque :
detail::build_deque<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type
>
{ {
typedef typename
detail::as_deque<result_of::size<Sequence>::value>
gen;
typedef typename gen::
template apply<typename result_of::begin<Sequence>::type>::type
type;
}; };
} }
@ -34,17 +41,18 @@ namespace boost { namespace fusion
inline typename result_of::as_deque<Sequence>::type inline typename result_of::as_deque<Sequence>::type
as_deque(Sequence& seq) as_deque(Sequence& seq)
{ {
typedef typename result_of::as_deque<Sequence>::gen gen; typedef result_of::as_deque<Sequence> gen;
return gen::call(fusion::begin(seq)); return gen::call(fusion::begin(seq), fusion::end(seq));
} }
template <typename Sequence> template <typename Sequence>
inline typename result_of::as_deque<Sequence const>::type inline typename result_of::as_deque<Sequence const>::type
as_deque(Sequence const& seq) as_deque(Sequence const& seq)
{ {
typedef typename result_of::as_deque<Sequence const>::gen gen; typedef result_of::as_deque<Sequence const> gen;
return gen::call(fusion::begin(seq)); return gen::call(fusion::begin(seq), fusion::end(seq));
} }
}} }}
#endif #endif
#endif

View File

@ -8,26 +8,23 @@
#if !defined(BOOST_FUSION_DEQUE_26112006_1649) #if !defined(BOOST_FUSION_DEQUE_26112006_1649)
#define BOOST_FUSION_DEQUE_26112006_1649 #define BOOST_FUSION_DEQUE_26112006_1649
#include <boost/config.hpp> # include <boost/fusion/container/deque/deque_fwd.hpp>
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// With variadics, we will use the PP version // Without variadics, we will use the PP version
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#if defined(BOOST_NO_VARIADIC_TEMPLATES) #if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
# include <boost/fusion/container/deque/detail/pp_deque.hpp> # include <boost/fusion/container/deque/detail/cpp03/deque.hpp>
#else #else
# if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
# define BOOST_FUSION_HAS_VARIADIC_DEQUE
# endif
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// C++11 variadic interface // C++11 interface
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/detail/access.hpp> #include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/support/is_sequence.hpp> #include <boost/fusion/support/is_sequence.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.hpp> #include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp> #include <boost/fusion/container/deque/detail/deque_keyed_values.hpp>
#include <boost/fusion/container/deque/deque_fwd.hpp> #include <boost/fusion/container/deque/deque_fwd.hpp>
#include <boost/fusion/container/deque/detail/value_at_impl.hpp> #include <boost/fusion/container/deque/detail/value_at_impl.hpp>
#include <boost/fusion/container/deque/detail/at_impl.hpp> #include <boost/fusion/container/deque/detail/at_impl.hpp>
@ -93,7 +90,7 @@ namespace boost { namespace fusion
: base(seq) : base(seq)
{} {}
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename ...Elements> template <typename ...Elements>
deque(deque<Elements...>&& seq) deque(deque<Elements...>&& seq)
: base(std::forward<deque<Elements...>>(seq)) : base(std::forward<deque<Elements...>>(seq))
@ -104,7 +101,7 @@ namespace boost { namespace fusion
: base(seq) : base(seq)
{} {}
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
deque(deque&& seq) deque(deque&& seq)
: base(std::forward<deque>(seq)) : base(std::forward<deque>(seq))
{} {}
@ -119,7 +116,7 @@ namespace boost { namespace fusion
: base(detail::deque_keyed_values<Head_, Tail_...>::construct(head, tail...)) : base(detail::deque_keyed_values<Head_, Tail_...>::construct(head, tail...))
{} {}
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename Head_, typename ...Tail_> template <typename Head_, typename ...Tail_>
explicit deque(Head_&& head, Tail_&&... tail) explicit deque(Head_&& head, Tail_&&... tail)
: base(detail::deque_keyed_values<Head, Tail...> : base(detail::deque_keyed_values<Head, Tail...>
@ -147,7 +144,7 @@ namespace boost { namespace fusion
return *this; return *this;
} }
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T> template <typename T>
deque& operator=(T&& rhs) deque& operator=(T&& rhs)
{ {

View File

@ -13,10 +13,10 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// With no decltype and variadics, we will use the C++03 version // With no decltype and variadics, we will use the C++03 version
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#if (defined(BOOST_NO_DECLTYPE) \ #if (defined(BOOST_NO_CXX11_DECLTYPE) \
|| defined(BOOST_NO_VARIADIC_TEMPLATES) \ || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \
|| defined(BOOST_NO_RVALUE_REFERENCES)) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES))
# include <boost/fusion/container/deque/detail/pp_deque_fwd.hpp> # include <boost/fusion/container/deque/detail/cpp03/deque_fwd.hpp>
#else #else
# if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) # if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
# define BOOST_FUSION_HAS_VARIADIC_DEQUE # define BOOST_FUSION_HAS_VARIADIC_DEQUE

View File

@ -0,0 +1,74 @@
/*=============================================================================
Copyright (c) 2005-2013 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_BUILD_DEQUE_02032013_1921)
#define BOOST_FUSION_BUILD_DEQUE_02032013_1921
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/value_of.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/container/deque/front_extended_deque.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename First, typename Last
, bool is_empty = result_of::equal_to<First, Last>::value>
struct build_deque;
template <typename First, typename Last>
struct build_deque<First, Last, true>
{
typedef deque<> type;
static type
call(First const&, Last const&)
{
return type();
}
};
template <typename T, typename Rest>
struct push_front_deque;
template <typename T, typename ...Rest>
struct push_front_deque<T, deque<Rest...>>
{
typedef deque<T, Rest...> type;
static type
call(T const& first, deque<Rest...> const& rest)
{
return type(front_extended_deque<deque<Rest...>, T>(rest, first));
}
};
template <typename First, typename Last>
struct build_deque<First, Last, false>
{
typedef
build_deque<typename result_of::next<First>::type, Last>
next_build_deque;
typedef push_front_deque<
typename result_of::value_of<First>::type
, typename next_build_deque::type>
push_front;
typedef typename push_front::type type;
static type
call(First const& f, Last const& l)
{
typename result_of::value_of<First>::type v = *f;
return push_front::call(
v, next_build_deque::call(fusion::next(f), l));
}
};
}}}
#endif

View File

@ -8,7 +8,7 @@
#if !defined(FUSION_CONVERT_IMPL_20061213_2207) #if !defined(FUSION_CONVERT_IMPL_20061213_2207)
#define FUSION_CONVERT_IMPL_20061213_2207 #define FUSION_CONVERT_IMPL_20061213_2207
#include <boost/fusion/container/deque/detail/as_deque.hpp> #include <boost/fusion/container/deque/convert.hpp>
#include <boost/fusion/container/deque/deque.hpp> #include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> #include <boost/fusion/sequence/intrinsic/size.hpp>
@ -17,6 +17,12 @@ namespace boost { namespace fusion
{ {
struct deque_tag; struct deque_tag;
namespace result_of
{
template <typename Sequence>
struct as_deque;
}
namespace extension namespace extension
{ {
template <typename T> template <typename T>
@ -28,14 +34,11 @@ namespace boost { namespace fusion
template <typename Sequence> template <typename Sequence>
struct apply struct apply
{ {
typedef detail::as_deque<result_of::size<Sequence>::value> gen; typedef result_of::as_deque<Sequence> gen;
typedef typename gen:: typedef typename gen::type type;
template apply<typename result_of::begin<Sequence>::type>::type
type;
static type call(Sequence& seq) static type call(Sequence& seq)
{ {
return gen::call(fusion::begin(seq)); return gen::call(seq);
} }
}; };
}; };

View File

@ -45,7 +45,7 @@ namespace boost { namespace fusion { namespace detail
}}} }}}
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/as_deque.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp") #pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
@ -78,7 +78,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \ typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
BOOST_PP_CAT(T, n); BOOST_PP_CAT(T, n);
#define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/as_deque.hpp> #define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/cpp03/as_deque.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE() #include BOOST_PP_ITERATE()

View File

@ -0,0 +1,52 @@
/*=============================================================================
Copyright (c) 2005-2013 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_BUILD_DEQUE_02032013_1921)
#define BOOST_FUSION_BUILD_DEQUE_02032013_1921
#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#error "C++03 only! This file should not have been included"
#endif
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
#include <boost/fusion/container/deque/detail/cpp03/as_deque.hpp>
#include <boost/fusion/container/deque/front_extended_deque.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence>
struct as_deque
{
typedef typename
detail::as_deque<result_of::size<Sequence>::value>
gen;
typedef typename gen::
template apply<typename result_of::begin<Sequence>::type>::type
type;
};
}
template <typename Sequence>
inline typename result_of::as_deque<Sequence>::type
as_deque(Sequence& seq)
{
typedef typename result_of::as_deque<Sequence>::gen gen;
return gen::call(fusion::begin(seq));
}
template <typename Sequence>
inline typename result_of::as_deque<Sequence const>::type
as_deque(Sequence const& seq)
{
typedef typename result_of::as_deque<Sequence const>::gen gen;
return gen::call(fusion::begin(seq));
}
}}
#endif

View File

@ -12,11 +12,11 @@
#error "C++03 only! This file should not have been included" #error "C++03 only! This file should not have been included"
#endif #endif
#include <boost/fusion/container/deque/limits.hpp> #include <boost/fusion/container/deque/detail/cpp03/limits.hpp>
#include <boost/fusion/container/deque/front_extended_deque.hpp> #include <boost/fusion/container/deque/front_extended_deque.hpp>
#include <boost/fusion/container/deque/back_extended_deque.hpp> #include <boost/fusion/container/deque/back_extended_deque.hpp>
#include <boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp> #include <boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp>
#include <boost/fusion/container/deque/detail/deque_initial_size.hpp> #include <boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp>
#include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.hpp> #include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp> #include <boost/preprocessor/repetition/enum_params.hpp>
@ -40,10 +40,10 @@
#include <boost/utility/enable_if.hpp> #include <boost/utility/enable_if.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/deque.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp") #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
#endif #endif
/*============================================================================= /*=============================================================================
@ -78,7 +78,7 @@ namespace boost { namespace fusion {
mpl::if_<mpl::equal_to<size, mpl::int_<0> >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down; mpl::if_<mpl::equal_to<size, mpl::int_<0> >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down;
typedef mpl::false_ is_view; typedef mpl::false_ is_view;
#include <boost/fusion/container/deque/detail/deque_forward_ctor.hpp> #include <boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp>
deque() deque()
{} {}
@ -91,9 +91,12 @@ namespace boost { namespace fusion {
: base(rhs) : base(rhs)
{} {}
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
explicit deque(T0&& t0) template <typename T0_>
: base(std::forward<T0>(t0), detail::nil_keyed_element()) explicit deque(T0_&& t0
, typename enable_if<is_convertible<T0_, T0> >::type* /*dummy*/ = 0
)
: base(std::forward<T0_>(t0), detail::nil_keyed_element())
{} {}
explicit deque(deque&& rhs) explicit deque(deque&& rhs)
@ -106,7 +109,7 @@ namespace boost { namespace fusion {
: base(seq) : base(seq)
{} {}
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)> template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq) deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq)
: base(std::forward<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(seq)) : base(std::forward<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(seq))
@ -134,7 +137,7 @@ namespace boost { namespace fusion {
return *this; return *this;
} }
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename T> template <typename T>
deque& deque&
operator=(T&& rhs) operator=(T&& rhs)
@ -145,6 +148,28 @@ namespace boost { namespace fusion {
#endif #endif
}; };
template <>
struct deque<> : detail::nil_keyed_element
{
typedef deque_tag fusion_tag;
typedef bidirectional_traversal_tag category;
typedef mpl::int_<0> size;
typedef mpl::int_<0> next_up;
typedef mpl::int_<0> next_down;
typedef mpl::false_ is_view;
template <typename Sequence>
deque(Sequence const&,
typename enable_if<
mpl::and_<
traits::is_sequence<Sequence>
, result_of::empty<Sequence> > >::type* /*dummy*/ = 0)
{}
deque() {}
};
}} }}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)

View File

@ -13,14 +13,14 @@
#error "C++03 only! This file should not have been included" #error "C++03 only! This file should not have been included"
#endif #endif
#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward<T##n>(t##n) #define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward<T_##n>(t##n)
#include <boost/preprocessor/iterate.hpp> #include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_shifted_params.hpp> #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp> #include <boost/preprocessor/repetition/enum_binary_params.hpp>
#define BOOST_PP_FILENAME_1 \ #define BOOST_PP_FILENAME_1 \
<boost/fusion/container/deque/detail/deque_forward_ctor.hpp> <boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp>
#define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_DEQUE_SIZE) #define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE() #include BOOST_PP_ITERATE()
@ -30,14 +30,21 @@
#define N BOOST_PP_ITERATION() #define N BOOST_PP_ITERATION()
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t)) deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t))
: base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::construct(BOOST_PP_ENUM_PARAMS(N, t))) : base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::construct(BOOST_PP_ENUM_PARAMS(N, t)))
{} {}
#if !defined(BOOST_NO_RVALUE_REFERENCES) #else
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && t))
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& t))
: base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::construct(BOOST_PP_ENUM_PARAMS(N, t)))
{}
template <BOOST_PP_ENUM_PARAMS(N, typename T_)>
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t))
: base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>:: : base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::
forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _))) forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _)))
{} {}
#endif #endif

View File

@ -12,14 +12,14 @@
#error "C++03 only! This file should not have been included" #error "C++03 only! This file should not have been included"
#endif #endif
#include <boost/fusion/container/deque/limits.hpp> #include <boost/fusion/container/deque/detail/cpp03/limits.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/deque_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_fwd.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR "_fwd.hpp") #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque" FUSION_MAX_DEQUE_SIZE_STR "_fwd.hpp")
#endif #endif
/*============================================================================= /*=============================================================================

View File

@ -25,7 +25,7 @@ namespace boost { namespace fusion
}} }}
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque_initial_size" FUSION_MAX_DEQUE_SIZE_STR ".hpp") #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque_initial_size" FUSION_MAX_DEQUE_SIZE_STR ".hpp")

View File

@ -12,7 +12,7 @@
#error "C++03 only! This file should not have been included" #error "C++03 only! This file should not have been included"
#endif #endif
#include <boost/fusion/container/deque/limits.hpp> #include <boost/fusion/container/deque/detail/cpp03/limits.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.hpp> #include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/preprocessor/iterate.hpp> #include <boost/preprocessor/iterate.hpp>
@ -34,7 +34,7 @@ namespace boost { namespace fusion
}} }}
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque_keyed_values" FUSION_MAX_DEQUE_SIZE_STR ".hpp") #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque_keyed_values" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
@ -68,7 +68,7 @@ namespace boost { namespace fusion { namespace detail
{ {
typedef nil_keyed_element type; typedef nil_keyed_element type;
static type call() static type construct()
{ {
return type(); return type();
} }
@ -89,7 +89,7 @@ namespace boost { namespace fusion { namespace detail
BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type tail; BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type tail;
typedef keyed_element<N, T0, tail> type; typedef keyed_element<N, T0, tail> type;
#include <boost/fusion/container/deque/detail/deque_keyed_values_call.hpp> #include <boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp>
}; };

View File

@ -19,10 +19,10 @@
#include <boost/preprocessor/repetition/enum_binary_params.hpp> #include <boost/preprocessor/repetition/enum_binary_params.hpp>
#define FUSION_DEQUE_KEYED_VALUES_FORWARD(z, n, _) \ #define FUSION_DEQUE_KEYED_VALUES_FORWARD(z, n, _) \
std::forward<BOOST_PP_CAT(T, n)>(BOOST_PP_CAT(t, n)) std::forward<BOOST_PP_CAT(T_, n)>(BOOST_PP_CAT(t, n))
#define BOOST_PP_FILENAME_1 \ #define BOOST_PP_FILENAME_1 \
<boost/fusion/container/deque/detail/deque_keyed_values_call.hpp> <boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE() #include BOOST_PP_ITERATE()
@ -40,19 +40,22 @@
#if N > 1 #if N > 1
, BOOST_PP_ENUM_SHIFTED_PARAMS(N, T) , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T)
#endif #endif
>::call(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t))); >::construct(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t)));
} }
static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && t)) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <BOOST_PP_ENUM_PARAMS(N, typename T_)>
static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t))
{ {
return type(std::forward<T0>(t0), return type(std::forward<T_0>(t0),
deque_keyed_values_impl< deque_keyed_values_impl<
next_index next_index
#if N > 1 #if N > 1
, BOOST_PP_ENUM_SHIFTED_PARAMS(N, T) , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T_)
#endif #endif
>::forward_(BOOST_PP_ENUM_SHIFTED(N, FUSION_DEQUE_KEYED_VALUES_FORWARD, _))); >::forward_(BOOST_PP_ENUM_SHIFTED(N, FUSION_DEQUE_KEYED_VALUES_FORWARD, _)));
} }
#endif
#undef N #undef N
#endif #endif

View File

@ -8,15 +8,15 @@
==============================================================================*/ ==============================================================================*/
#if FUSION_MAX_DEQUE_SIZE <= 10 #if FUSION_MAX_DEQUE_SIZE <= 10
#include <boost/fusion/container/deque/detail/preprocessed/as_deque10.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque10.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 20 #elif FUSION_MAX_DEQUE_SIZE <= 20
#include <boost/fusion/container/deque/detail/preprocessed/as_deque20.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque20.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 30 #elif FUSION_MAX_DEQUE_SIZE <= 30
#include <boost/fusion/container/deque/detail/preprocessed/as_deque30.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque30.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 40 #elif FUSION_MAX_DEQUE_SIZE <= 40
#include <boost/fusion/container/deque/detail/preprocessed/as_deque40.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque40.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 50 #elif FUSION_MAX_DEQUE_SIZE <= 50
#include <boost/fusion/container/deque/detail/preprocessed/as_deque50.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque50.hpp>
#else #else
#error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers"
#endif #endif

View File

@ -8,15 +8,15 @@
==============================================================================*/ ==============================================================================*/
#if FUSION_MAX_DEQUE_SIZE <= 10 #if FUSION_MAX_DEQUE_SIZE <= 10
#include <boost/fusion/container/deque/detail/preprocessed/deque10.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 20 #elif FUSION_MAX_DEQUE_SIZE <= 20
#include <boost/fusion/container/deque/detail/preprocessed/deque20.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 30 #elif FUSION_MAX_DEQUE_SIZE <= 30
#include <boost/fusion/container/deque/detail/preprocessed/deque30.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 40 #elif FUSION_MAX_DEQUE_SIZE <= 40
#include <boost/fusion/container/deque/detail/preprocessed/deque40.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 50 #elif FUSION_MAX_DEQUE_SIZE <= 50
#include <boost/fusion/container/deque/detail/preprocessed/deque50.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp>
#else #else
#error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers"
#endif #endif

View File

@ -8,15 +8,15 @@
==============================================================================*/ ==============================================================================*/
#if FUSION_MAX_DEQUE_SIZE <= 10 #if FUSION_MAX_DEQUE_SIZE <= 10
#include <boost/fusion/container/deque/detail/preprocessed/deque10_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque10_fwd.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 20 #elif FUSION_MAX_DEQUE_SIZE <= 20
#include <boost/fusion/container/deque/detail/preprocessed/deque20_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque20_fwd.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 30 #elif FUSION_MAX_DEQUE_SIZE <= 30
#include <boost/fusion/container/deque/detail/preprocessed/deque30_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque30_fwd.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 40 #elif FUSION_MAX_DEQUE_SIZE <= 40
#include <boost/fusion/container/deque/detail/preprocessed/deque40_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque40_fwd.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 50 #elif FUSION_MAX_DEQUE_SIZE <= 50
#include <boost/fusion/container/deque/detail/preprocessed/deque50_fwd.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque50_fwd.hpp>
#else #else
#error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers"
#endif #endif

View File

@ -8,15 +8,15 @@
==============================================================================*/ ==============================================================================*/
#if FUSION_MAX_DEQUE_SIZE <= 10 #if FUSION_MAX_DEQUE_SIZE <= 10
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size10.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size10.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 20 #elif FUSION_MAX_DEQUE_SIZE <= 20
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size20.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size20.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 30 #elif FUSION_MAX_DEQUE_SIZE <= 30
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size30.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size30.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 40 #elif FUSION_MAX_DEQUE_SIZE <= 40
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size40.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size40.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 50 #elif FUSION_MAX_DEQUE_SIZE <= 50
#include <boost/fusion/container/deque/detail/preprocessed/deque_initial_size50.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size50.hpp>
#else #else
#error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers"
#endif #endif

View File

@ -8,15 +8,15 @@
==============================================================================*/ ==============================================================================*/
#if FUSION_MAX_DEQUE_SIZE <= 10 #if FUSION_MAX_DEQUE_SIZE <= 10
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values10.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values10.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 20 #elif FUSION_MAX_DEQUE_SIZE <= 20
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values20.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values20.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 30 #elif FUSION_MAX_DEQUE_SIZE <= 30
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values30.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values30.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 40 #elif FUSION_MAX_DEQUE_SIZE <= 40
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values40.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values40.hpp>
#elif FUSION_MAX_DEQUE_SIZE <= 50 #elif FUSION_MAX_DEQUE_SIZE <= 50
#include <boost/fusion/container/deque/detail/preprocessed/deque_keyed_values50.hpp> #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values50.hpp>
#else #else
#error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers"
#endif #endif

View File

@ -51,7 +51,7 @@ namespace boost { namespace fusion { namespace detail
: Rest(rhs.get_base()), value_(rhs.value_) : Rest(rhs.get_base()), value_(rhs.value_)
{} {}
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
keyed_element(keyed_element&& rhs) keyed_element(keyed_element&& rhs)
: Rest(std::forward<Rest>(rhs.forward_base())) : Rest(std::forward<Rest>(rhs.forward_base()))
, value_(std::forward<Value>(rhs.value_)) , value_(std::forward<Value>(rhs.value_))
@ -63,7 +63,7 @@ namespace boost { namespace fusion { namespace detail
: Rest(rhs.get_base()), value_(rhs.value_) : Rest(rhs.get_base()), value_(rhs.value_)
{} {}
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
#endif #endif
Rest& get_base() Rest& get_base()
@ -76,7 +76,7 @@ namespace boost { namespace fusion { namespace detail
return *this; return *this;
} }
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
Rest&& forward_base() Rest&& forward_base()
{ {
return std::forward<Rest>(*static_cast<Rest*>(this)); return std::forward<Rest>(*static_cast<Rest*>(this));
@ -99,7 +99,7 @@ namespace boost { namespace fusion { namespace detail
: Rest(rest), value_(value) : Rest(rest), value_(value)
{} {}
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
keyed_element(Value&& value, Rest&& rest) keyed_element(Value&& value, Rest&& rest)
: Rest(std::forward<Rest>(rest)) : Rest(std::forward<Rest>(rest))
, value_(std::forward<Value>(value)) , value_(std::forward<Value>(value))
@ -125,7 +125,7 @@ namespace boost { namespace fusion { namespace detail
return *this; return *this;
} }
#if !defined(BOOST_NO_RVALUE_REFERENCES) #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
keyed_element& operator=(keyed_element&& rhs) keyed_element& operator=(keyed_element&& rhs)
{ {
base::operator=(std::forward<keyed_element>(rhs)); base::operator=(std::forward<keyed_element>(rhs));

View File

@ -30,7 +30,7 @@ namespace boost { namespace fusion
: base(val, deque) : base(val, deque)
{} {}
#if defined(BOOST_NO_RVALUE_REFERENCES) #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
template <typename Arg> template <typename Arg>
front_extended_deque(Deque const& deque, Arg& val) front_extended_deque(Deque const& deque, Arg& val)
: base(val, deque) : base(val, deque)

View File

@ -11,11 +11,11 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
namespace result_of namespace result_of
{ {
template <typename Car, typename Cdr = nil> template <typename Car, typename Cdr = nil_>
struct cons_tie struct cons_tie
{ {
typedef cons<Car&, Cdr> type; typedef cons<Car&, Cdr> type;

View File

@ -1,41 +1,23 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2013 Joel de Guzman
Copyright (c) 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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING #if !defined(FUSION_DEQUE_TIE_01272013_1401)
#if !defined(FUSION_DEQUE_TIE_07192005_1242) #define FUSION_DEQUE_TIE_01272013_1401
#define FUSION_DEQUE_TIE_07192005_1242
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/deque/deque.hpp> #include <boost/fusion/container/deque/deque.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#include <boost/fusion/container/generation/detail/preprocessed/deque_tie.hpp> # include <boost/fusion/container/generation/detail/pp_deque_tie.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque_tie" FUSION_MAX_DEQUE_SIZE_STR".hpp")
#endif
/*============================================================================= ///////////////////////////////////////////////////////////////////////////////
Copyright (c) 2001-2011 Joel de Guzman // C++11 variadic interface
///////////////////////////////////////////////////////////////////////////////
Distributed under the Boost Software License, Version 1.0. (See accompanying #include <boost/fusion/support/detail/as_fusion_element.hpp>
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
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -43,63 +25,21 @@ namespace boost { namespace fusion
namespace result_of namespace result_of
{ {
template < template <typename ...T>
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( struct deque_tie
FUSION_MAX_DEQUE_SIZE, typename T, void_)
, typename Extra = void_
>
struct deque_tie;
}
#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/deque_tie.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_REF
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{ {
template <BOOST_PP_ENUM_PARAMS(N, typename T)> typedef deque<T&...> type;
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct deque_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
#undef TEXT
#else
struct deque_tie<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
}; };
} }
template <BOOST_PP_ENUM_PARAMS(N, typename T)> template <typename ...T>
inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> inline deque<T&...>
deque_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) deque_tie(T&... arg)
{ {
return deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>( return deque<T&...>(arg...);
BOOST_PP_ENUM_PARAMS(N, _));
} }
}}
#undef N #endif
#endif // defined(BOOST_PP_IS_ITERATING) #endif

View File

@ -0,0 +1,105 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2006 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_PP_DEQUE_TIE_07192005_1242)
#define FUSION_PP_DEQUE_TIE_07192005_1242
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/deque/deque.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/generation/detail/preprocessed/deque_tie.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/deque_tie" FUSION_MAX_DEQUE_SIZE_STR".hpp")
#endif
/*=============================================================================
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
namespace boost { namespace fusion
{
struct void_;
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_DEQUE_SIZE, typename T, void_)
, typename Extra = void_
>
struct deque_tie;
}
#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_deque_tie.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_REF
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct deque_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
#undef TEXT
#else
struct deque_tie<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
};
}
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>
deque_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _))
{
return deque<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>(
BOOST_PP_ENUM_PARAMS(N, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -0,0 +1,121 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2006 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_PP_MAKE_DEQUE_07162005_0243)
#define FUSION_MAKE_PP_DEQUE_07162005_0243
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/generation/detail/preprocessed/make_deque.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_deque" FUSION_MAX_DEQUE_SIZE_STR".hpp")
#endif
/*=============================================================================
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
namespace boost { namespace fusion
{
struct void_;
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_DEQUE_SIZE, typename T, void_)
, typename Extra = void_
>
struct make_deque;
template <>
struct make_deque<>
{
typedef deque<> type;
};
}
inline deque<>
make_deque()
{
return deque<>();
}
#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_deque.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_AS_FUSION_ELEMENT
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct make_deque< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
#undef TEXT
#else
struct make_deque<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
};
}
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
{
return deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
BOOST_PP_ENUM_PARAMS(N, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -0,0 +1,132 @@
/*=============================================================================
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_PP_IS_ITERATING
#if !defined(FUSION_PP_MAKE_MAP_07222005_1247)
#define FUSION_PP_MAKE_MAP_07222005_1247
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/map/map.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/support/pair.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/generation/detail/preprocessed/make_map.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_map" FUSION_MAX_MAP_SIZE_STR".hpp")
#endif
/*=============================================================================
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
namespace boost { namespace fusion
{
struct void_;
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_VECTOR_SIZE, typename K, void_)
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_VECTOR_SIZE, typename D, void_)
, typename Extra = void_
>
struct make_map;
template <>
struct make_map<>
{
typedef map<> type;
};
}
inline map<>
make_map()
{
return map<>();
}
#define BOOST_FUSION_PAIR(z, n, data) \
fusion::pair< \
BOOST_PP_CAT(K, n) \
, typename detail::as_fusion_element<BOOST_PP_CAT(D, n)>::type>
#define BOOST_FUSION_MAKE_PAIR(z, n, data) \
fusion::make_pair<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_map.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_PAIR
#undef BOOST_FUSION_MAKE_PAIR
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_VECTOR_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_)>
#undef TEXT
#else
struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
#endif
{
typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)> type;
};
}
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
inline map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>
make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& _))
{
return map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>(
BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -0,0 +1,136 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2006 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_PP_MAP_TIE_20060814_1116)
#define FUSION_PP_MAP_TIE_20060814_1116
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/map/map.hpp>
#include <boost/fusion/container/map/detail/cpp03/limits.hpp>
#include <boost/fusion/support/pair.hpp>
#include <boost/fusion/container/generation/pair_tie.hpp>
#include <boost/type_traits/add_reference.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/generation/detail/preprocessed/map_tie.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/map_tie" FUSION_MAX_MAP_SIZE_STR".hpp")
#endif
/*=============================================================================
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
namespace boost { namespace fusion
{
struct void_;
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_MAP_SIZE, typename K, void_)
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_MAP_SIZE, typename D, void_)
, typename Extra = void_
>
struct map_tie;
template <>
struct map_tie<>
{
typedef map<> type;
};
}
inline map<>
map_tie()
{
return map<>();
}
#define BOOST_FUSION_TIED_PAIR(z, n, data) \
fusion::pair< \
BOOST_PP_CAT(K, n) \
, typename add_reference<BOOST_PP_CAT(D, n)>::type>
#define BOOST_FUSION_PAIR_TIE(z, n, data) \
fusion::pair_tie<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_map_tie.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_PAIR
#undef BOOST_FUSION_MAKE_PAIR
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_MAP_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_MAP_SIZE, TEXT, void_)>
#undef TEXT
#else
struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
#endif
{
typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)> type;
};
}
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
inline map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>
map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & _))
{
return map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>(
BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -13,11 +13,11 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
namespace result_of namespace result_of
{ {
template <typename Car, typename Cdr = nil> template <typename Car, typename Cdr = nil_>
struct make_cons struct make_cons
{ {
typedef cons<typename detail::as_fusion_element<Car>::type, Cdr> type; typedef cons<typename detail::as_fusion_element<Car>::type, Cdr> type;

View File

@ -1,124 +1,43 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2013 Joel de Guzman
Copyright (c) 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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
/*============================================================================= #if !defined(FUSION_MAKE_DEQUE_01272013_1401)
Copyright (c) 2001-2011 Joel de Guzman #define FUSION_MAKE_DEQUE_01272013_1401
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_MAKE_DEQUE_07162005_0243)
#define FUSION_MAKE_DEQUE_07162005_0243
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/deque/deque.hpp> #include <boost/fusion/container/deque/deque.hpp>
#include <boost/fusion/support/detail/as_fusion_element.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
#include <boost/fusion/container/generation/detail/preprocessed/make_deque.hpp> # include <boost/fusion/container/generation/detail/pp_make_deque.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_deque" FUSION_MAX_DEQUE_SIZE_STR".hpp")
#endif
/*============================================================================= ///////////////////////////////////////////////////////////////////////////////
Copyright (c) 2001-2011 Joel de Guzman // C++11 variadic interface
///////////////////////////////////////////////////////////////////////////////
Distributed under the Boost Software License, Version 1.0. (See accompanying #include <boost/fusion/support/detail/as_fusion_element.hpp>
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
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct void_;
namespace result_of namespace result_of
{ {
template < template <typename ...T>
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( struct make_deque
FUSION_MAX_DEQUE_SIZE, typename T, void_)
, typename Extra = void_
>
struct make_deque;
template <>
struct make_deque<>
{ {
typedef deque<> type; typedef deque<T...> type;
}; };
} }
inline deque<> template <typename ...T>
make_deque() inline deque<typename detail::as_fusion_element<T>::type...>
make_deque(T const&... arg)
{ {
return deque<>(); return deque<typename detail::as_fusion_element<T>::type...>(arg...);
} }
#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_deque.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_AS_FUSION_ELEMENT
}} }}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #endif
#pragma wave option(output: null)
#endif #endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct make_deque< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
#undef TEXT
#else
struct make_deque<BOOST_PP_ENUM_PARAMS(N, T)>
#endif
{
typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
};
}
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
{
return deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
BOOST_PP_ENUM_PARAMS(N, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -1,132 +1,62 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2013 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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING
#if !defined(FUSION_MAKE_MAP_07222005_1247) #if !defined(FUSION_MAKE_MAP_07222005_1247)
#define FUSION_MAKE_MAP_07222005_1247 #define FUSION_MAKE_MAP_07222005_1247
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/map/map.hpp> #include <boost/fusion/container/map/map.hpp>
#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP)
# include <boost/fusion/container/generation/detail/pp_make_map.hpp>
#else
///////////////////////////////////////////////////////////////////////////////
// C++11 variadic interface
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/support/detail/as_fusion_element.hpp> #include <boost/fusion/support/detail/as_fusion_element.hpp>
#include <boost/fusion/support/pair.hpp> #include <boost/fusion/support/pair.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/generation/detail/preprocessed/make_map.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_map" FUSION_MAX_MAP_SIZE_STR".hpp")
#endif
/*=============================================================================
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
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct void_;
namespace result_of namespace result_of
{ {
template < template <typename ...Key>
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( struct make_map
FUSION_MAX_VECTOR_SIZE, typename K, void_)
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_VECTOR_SIZE, typename D, void_)
, typename Extra = void_
>
struct make_map;
template <>
struct make_map<>
{ {
typedef map<> type; template <typename ...T>
struct apply
{
typedef map<
fusion::pair<
Key
, typename detail::as_fusion_element<T>::type
>...>
type;
};
}; };
} }
inline map<> template <typename ...Key, typename ...T>
make_map() inline map<
fusion::pair<
Key
, typename detail::as_fusion_element<T>::type
>...>
make_map(T const&... arg)
{ {
return map<>(); typedef map<
fusion::pair<
Key
, typename detail::as_fusion_element<T>::type
>...>
result_type;
return result_type(arg...);
} }
#define BOOST_FUSION_PAIR(z, n, data) \
fusion::pair< \
BOOST_PP_CAT(K, n) \
, typename detail::as_fusion_element<BOOST_PP_CAT(D, n)>::type>
#define BOOST_FUSION_MAKE_PAIR(z, n, data) \
fusion::make_pair<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_map.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_PAIR
#undef BOOST_FUSION_MAKE_PAIR
}} }}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif #endif
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_VECTOR_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_)>
#undef TEXT
#else
struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
#endif
{
typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)> type;
};
}
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
inline map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>
make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& _))
{
return map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>(
BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -1,136 +1,46 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2013 Joel de Guzman
Copyright (c) 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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
#ifndef BOOST_PP_IS_ITERATING #if !defined(FUSION_MAP_TIE_07222005_1247)
#if !defined(FUSION_MAP_TIE_20060814_1116) #define FUSION_MAP_TIE_07222005_1247
#define FUSION_MAP_TIE_20060814_1116
#include <boost/preprocessor/iterate.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/fusion/container/map/map.hpp> #include <boost/fusion/container/map/map.hpp>
#include <boost/fusion/container/map/limits.hpp>
#include <boost/fusion/support/pair.hpp>
#include <boost/fusion/container/generation/pair_tie.hpp>
#include <boost/type_traits/add_reference.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_HAS_VARIADIC_MAP)
#include <boost/fusion/container/generation/detail/preprocessed/map_tie.hpp> # include <boost/fusion/container/generation/detail/pp_map_tie.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/map_tie" FUSION_MAX_MAP_SIZE_STR".hpp")
#endif
/*============================================================================= ///////////////////////////////////////////////////////////////////////////////
Copyright (c) 2001-2011 Joel de Guzman // C++11 variadic interface
///////////////////////////////////////////////////////////////////////////////
Distributed under the Boost Software License, Version 1.0. (See accompanying #include <boost/fusion/support/pair.hpp>
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
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct void_;
namespace result_of namespace result_of
{ {
template < template <typename ...Key>
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( struct map_tie
FUSION_MAX_MAP_SIZE, typename K, void_)
, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
FUSION_MAX_MAP_SIZE, typename D, void_)
, typename Extra = void_
>
struct map_tie;
template <>
struct map_tie<>
{ {
typedef map<> type; template <typename ...T>
struct apply
{
typedef map<fusion::pair<Key, T&>...> type;
};
}; };
} }
inline map<> template <typename ...Key, typename ...T>
map_tie() inline map<fusion::pair<Key, T&>...>
map_tie(T&... arg)
{ {
return map<>(); typedef map<fusion::pair<Key, T&>...> result_type;
return result_type(arg...);
} }
#define BOOST_FUSION_TIED_PAIR(z, n, data) \
fusion::pair< \
BOOST_PP_CAT(K, n) \
, typename add_reference<BOOST_PP_CAT(D, n)>::type>
#define BOOST_FUSION_PAIR_TIE(z, n, data) \
fusion::pair_tie<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/map_tie.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
#include BOOST_PP_ITERATE()
#undef BOOST_FUSION_PAIR
#undef BOOST_FUSION_MAKE_PAIR
}} }}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif #endif
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
#else // defined(BOOST_PP_IS_ITERATING)
///////////////////////////////////////////////////////////////////////////////
//
// Preprocessor vertical repetition code
//
///////////////////////////////////////////////////////////////////////////////
#define N BOOST_PP_ITERATION()
namespace result_of
{
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
#define TEXT(z, n, text) , text
struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_MAP_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_MAP_SIZE, TEXT, void_)>
#undef TEXT
#else
struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D)>
#endif
{
typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)> type;
};
}
template <
BOOST_PP_ENUM_PARAMS(N, typename K)
, BOOST_PP_ENUM_PARAMS(N, typename D)
>
inline map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>
map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & _))
{
return map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>(
BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, _));
}
#undef N
#endif // defined(BOOST_PP_IS_ITERATING)

View File

@ -34,7 +34,7 @@ namespace boost { namespace fusion
struct forward_traversal_tag; struct forward_traversal_tag;
struct fusion_sequence_tag; struct fusion_sequence_tag;
struct nil : sequence_base<nil> struct nil_ : sequence_base<nil_>
{ {
typedef mpl::int_<0> size; typedef mpl::int_<0> size;
typedef cons_tag fusion_tag; typedef cons_tag fusion_tag;
@ -44,10 +44,10 @@ namespace boost { namespace fusion
typedef void_ car_type; typedef void_ car_type;
typedef void_ cdr_type; typedef void_ cdr_type;
nil() {} nil_() {}
template <typename Iterator> template <typename Iterator>
nil(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/) nil_(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/)
{} {}
template <typename Iterator> template <typename Iterator>
@ -56,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> > struct cons : sequence_base<cons<Car, Cdr> >
{ {
typedef mpl::int_<Cdr::size::value+1> size; typedef mpl::int_<Cdr::size::value+1> size;

View File

@ -10,9 +10,12 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
#ifndef nil
typedef nil_ nil;
#endif
template <typename Car, typename Cdr = nil> template <typename Car, typename Cdr = nil_>
struct cons; struct cons;
}} }}

View File

@ -18,14 +18,14 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
struct cons_iterator_tag; struct cons_iterator_tag;
struct forward_traversal_tag; struct forward_traversal_tag;
template <typename Cons> template <typename Cons>
struct cons_iterator_identity; struct cons_iterator_identity;
template <typename Cons = nil> template <typename Cons = nil_>
struct cons_iterator : iterator_base<cons_iterator<Cons> > struct cons_iterator : iterator_base<cons_iterator<Cons> >
{ {
typedef cons_iterator_tag fusion_tag; typedef cons_iterator_tag fusion_tag;
@ -49,40 +49,40 @@ namespace boost { namespace fusion
{ {
typedef forward_traversal_tag category; typedef forward_traversal_tag category;
typedef cons_iterator_tag fusion_tag; typedef cons_iterator_tag fusion_tag;
typedef nil cons_type; typedef nil_ cons_type;
typedef cons_iterator_identity< typedef cons_iterator_identity<
add_const<nil>::type> add_const<nil_>::type>
identity; identity;
nil_iterator() {} nil_iterator() {}
explicit nil_iterator(nil const&) {} explicit nil_iterator(nil_ const&) {}
}; };
template <> template <>
struct cons_iterator<nil> : nil_iterator struct cons_iterator<nil_> : nil_iterator
{ {
cons_iterator() {} cons_iterator() {}
explicit cons_iterator(nil const&) {} explicit cons_iterator(nil_ const&) {}
}; };
template <> template <>
struct cons_iterator<nil const> : nil_iterator struct cons_iterator<nil_ const> : nil_iterator
{ {
cons_iterator() {} cons_iterator() {}
explicit cons_iterator(nil const&) {} explicit cons_iterator(nil_ const&) {}
}; };
template <> template <>
struct cons_iterator<list<> > : nil_iterator struct cons_iterator<list<> > : nil_iterator
{ {
cons_iterator() {} cons_iterator() {}
explicit cons_iterator(nil const&) {} explicit cons_iterator(nil_ const&) {}
}; };
template <> template <>
struct cons_iterator<list<> const> : nil_iterator struct cons_iterator<list<> const> : nil_iterator
{ {
cons_iterator() {} cons_iterator() {}
explicit cons_iterator(nil const&) {} explicit cons_iterator(nil_ const&) {}
}; };
}} }}

View File

@ -13,7 +13,7 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
struct cons_tag; struct cons_tag;

View File

@ -24,12 +24,12 @@ namespace boost { namespace fusion { namespace detail
template <typename First, typename Last> template <typename First, typename Last>
struct build_cons<First, Last, true> struct build_cons<First, Last, true>
{ {
typedef nil type; typedef nil_ type;
static nil static nil_
call(First const&, Last const&) call(First const&, Last const&)
{ {
return nil(); return nil_();
} }
}; };

View File

@ -13,7 +13,7 @@ namespace boost { namespace fusion
{ {
struct cons_tag; struct cons_tag;
struct nil; struct nil_;
template <typename Car, typename Cdr> template <typename Car, typename Cdr>
struct cons; struct cons;
@ -28,7 +28,7 @@ namespace boost { namespace fusion
{ {
template <typename Sequence> template <typename Sequence>
struct apply struct apply
: boost::is_convertible<Sequence, nil> : boost::is_convertible<Sequence, nil_>
{}; {};
}; };
} }

View File

@ -13,7 +13,7 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
struct cons_tag; struct cons_tag;
@ -35,7 +35,7 @@ namespace boost { namespace fusion
struct apply struct apply
{ {
typedef cons_iterator< typedef cons_iterator<
typename mpl::if_<is_const<Sequence>, nil const, nil>::type> typename mpl::if_<is_const<Sequence>, nil_ const, nil_>::type>
type; type;
static type static type

View File

@ -18,7 +18,7 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
struct void_; struct void_;
}} }}
@ -61,7 +61,7 @@ namespace boost { namespace fusion { namespace detail
template <> template <>
struct list_to_cons<BOOST_PP_ENUM(FUSION_MAX_LIST_SIZE, FUSION_VOID, _)> struct list_to_cons<BOOST_PP_ENUM(FUSION_MAX_LIST_SIZE, FUSION_VOID, _)>
{ {
typedef nil type; typedef nil_ type;
}; };
}}} }}}

View File

@ -8,7 +8,7 @@
==============================================================================*/ ==============================================================================*/
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
struct void_; struct void_;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9> template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
struct list struct list

View File

@ -8,7 +8,7 @@
==============================================================================*/ ==============================================================================*/
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
struct void_; struct void_;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19> template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
struct list struct list

View File

@ -8,7 +8,7 @@
==============================================================================*/ ==============================================================================*/
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
struct void_; struct void_;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29> template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29>
struct list struct list

View File

@ -8,7 +8,7 @@
==============================================================================*/ ==============================================================================*/
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
struct void_; struct void_;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39> template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39>
struct list struct list

View File

@ -8,7 +8,7 @@
==============================================================================*/ ==============================================================================*/
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
struct void_; struct void_;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49> template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49>
struct list struct list

View File

@ -81,6 +81,6 @@ namespace boost { namespace fusion { namespace detail
template <> template <>
struct list_to_cons<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_> struct list_to_cons<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{ {
typedef nil type; typedef nil_ type;
}; };
}}} }}}

View File

@ -141,6 +141,6 @@ namespace boost { namespace fusion { namespace detail
template <> template <>
struct list_to_cons<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_> struct list_to_cons<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{ {
typedef nil type; typedef nil_ type;
}; };
}}} }}}

View File

@ -201,6 +201,6 @@ namespace boost { namespace fusion { namespace detail
template <> template <>
struct list_to_cons<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_> struct list_to_cons<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{ {
typedef nil type; typedef nil_ type;
}; };
}}} }}}

View File

@ -261,6 +261,6 @@ namespace boost { namespace fusion { namespace detail
template <> template <>
struct list_to_cons<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_> struct list_to_cons<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{ {
typedef nil type; typedef nil_ type;
}; };
}}} }}}

View File

@ -321,6 +321,6 @@ namespace boost { namespace fusion { namespace detail
template <> template <>
struct list_to_cons<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_> struct list_to_cons<void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_>
{ {
typedef nil type; typedef nil_ type;
}; };
}}} }}}

View File

@ -12,7 +12,7 @@
namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail
{ {
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
template<typename Cons, typename State = nil> template<typename Cons, typename State = nil_>
struct reverse_cons; struct reverse_cons;
template<typename Car, typename Cdr, typename State> template<typename Car, typename Cdr, typename State>
@ -29,11 +29,11 @@ namespace boost { namespace fusion { namespace detail
}; };
template<typename State> template<typename State>
struct reverse_cons<nil, State> struct reverse_cons<nil_, State>
{ {
typedef State type; typedef State type;
static State const &call(nil const &, State const &state = State()) static State const &call(nil_ const &, State const &state = State())
{ {
return state; return state;
} }

View File

@ -32,7 +32,7 @@
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
struct nil; struct nil_;
struct void_; struct void_;
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)> template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_LIST_SIZE, typename T)>

View File

@ -7,7 +7,6 @@
#if !defined(FUSION_SEQUENCE_CLASS_MAP_10022005_0606) #if !defined(FUSION_SEQUENCE_CLASS_MAP_10022005_0606)
#define FUSION_SEQUENCE_CLASS_MAP_10022005_0606 #define FUSION_SEQUENCE_CLASS_MAP_10022005_0606
#include <boost/fusion/container/map/limits.hpp>
#include <boost/fusion/container/map/map.hpp> #include <boost/fusion/container/map/map.hpp>
#include <boost/fusion/container/map/map_fwd.hpp> #include <boost/fusion/container/map/map_fwd.hpp>
#include <boost/fusion/container/map/convert.hpp> #include <boost/fusion/container/map/convert.hpp>

View File

@ -4,26 +4,34 @@
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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
#if !defined(FUSION_CONVERT_09232005_1340) #if !defined(FUSION_CONVERT_MAIN_09232005_1340)
#define FUSION_CONVERT_09232005_1340 #define FUSION_CONVERT_MAIN_09232005_1340
#include <boost/fusion/container/map/detail/as_map.hpp>
#include <boost/fusion/container/map/detail/convert_impl.hpp>
#include <boost/fusion/container/map/map.hpp> #include <boost/fusion/container/map/map.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> ///////////////////////////////////////////////////////////////////////////////
// Without variadics, we will use the PP version
///////////////////////////////////////////////////////////////////////////////
#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP)
# include <boost/fusion/container/map/detail/cpp03/convert.hpp>
#else
///////////////////////////////////////////////////////////////////////////////
// C++11 variadic implementation
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/container/map/detail/build_map.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
namespace result_of namespace result_of
{ {
template <typename Sequence> template <typename Sequence>
struct as_map struct as_map :
detail::build_map<
typename result_of::begin<Sequence>::type
, typename result_of::end<Sequence>::type
>
{ {
typedef typename detail::as_map<result_of::size<Sequence>::value> gen;
typedef typename gen::
template apply<typename result_of::begin<Sequence>::type>::type
type;
}; };
} }
@ -31,16 +39,16 @@ namespace boost { namespace fusion
inline typename result_of::as_map<Sequence>::type inline typename result_of::as_map<Sequence>::type
as_map(Sequence& seq) as_map(Sequence& seq)
{ {
typedef typename result_of::as_map<Sequence>::gen gen; typedef result_of::as_map<Sequence> gen;
return gen::call(fusion::begin(seq)); return gen::call(fusion::begin(seq), fusion::end(seq));
} }
template <typename Sequence> template <typename Sequence>
inline typename result_of::as_map<Sequence const>::type inline typename result_of::as_map<Sequence const>::type
as_map(Sequence const& seq) as_map(Sequence const& seq)
{ {
typedef typename result_of::as_map<Sequence const>::gen gen; typedef result_of::as_map<Sequence const> gen;
return gen::call(fusion::begin(seq)); return gen::call(fusion::begin(seq), fusion::end(seq));
} }
namespace extension namespace extension
@ -69,3 +77,5 @@ namespace boost { namespace fusion
}} }}
#endif #endif
#endif

View File

@ -1,17 +1,13 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2013 Joel de Guzman
Copyright (c) 2011 Brandon Kohn
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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
#if !defined(BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP) #if !defined(BOOST_FUSION_MAP_DETAIL_AT_IMPL_02042013_0821)
#define BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP #define BOOST_FUSION_MAP_DETAIL_AT_IMPL_02042013_0821
#include <boost/fusion/support/detail/access.hpp> #include <boost/fusion/support/detail/access.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/int.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
@ -26,36 +22,36 @@ namespace boost { namespace fusion
struct at_impl<map_tag> struct at_impl<map_tag>
{ {
template <typename Sequence, typename N> template <typename Sequence, typename N>
struct apply struct apply
{ {
typedef typename typedef mpl::int_<N::value> index;
mpl::at<typename Sequence::storage_type::types, N>::type typedef
element; decltype(std::declval<Sequence>().get(index()))
typedef typename detail::ref_result<element>::type type; type;
static type static type
call(Sequence& m) call(Sequence& m)
{ {
return m.get_data().at_impl(N()); return m.get(index());
} }
}; };
template <typename Sequence, typename N> template <typename Sequence, typename N>
struct apply<Sequence const, N> struct apply<Sequence const, N>
{ {
typedef typename typedef mpl::int_<N::value> index;
mpl::at<typename Sequence::storage_type::types, N>::type typedef
element; decltype(std::declval<Sequence const>().get(index()))
typedef typename detail::cref_result<element>::type type; type;
static type static type
call(Sequence const& m) call(Sequence const& m)
{ {
return m.get_data().at_impl(N()); return m.get(index());
} }
}; };
}; };
} }
}} }}
#endif //BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP #endif

View File

@ -0,0 +1,58 @@
/*=============================================================================
Copyright (c) 2001-2013 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_MAP_DETAIL_AT_KEY_IMPL_02042013_0821)
#define BOOST_FUSION_MAP_DETAIL_AT_KEY_IMPL_02042013_0821
#include <boost/fusion/support/detail/access.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/identity.hpp>
namespace boost { namespace fusion
{
struct map_tag;
namespace extension
{
template <typename Tag>
struct at_key_impl;
template <>
struct at_key_impl<map_tag>
{
template <typename Sequence, typename Key>
struct apply
{
typedef
decltype(std::declval<Sequence>().get(mpl::identity<Key>()))
type;
static type
call(Sequence& m)
{
return m.get(mpl::identity<Key>());
}
};
template <typename Sequence, typename Key>
struct apply<Sequence const, Key>
{
typedef
decltype(std::declval<Sequence const>().get(mpl::identity<Key>()))
type;
static type
call(Sequence const& m)
{
return m.get(mpl::identity<Key>());
}
};
};
}
}}
#endif

View File

@ -1,43 +1,38 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2005-2013 Joel de Guzman
Copyright (c) 2009 Christopher Schmidt
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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/ ==============================================================================*/
#if !defined(BOOST_FUSION_MAP_BEGIN_IMPL_02042013_0857)
#define BOOST_FUSION_MAP_BEGIN_IMPL_02042013_0857
#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP #include <boost/fusion/container/map/map_iterator.hpp>
#define BOOST_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP
#include <boost/fusion/iterator/basic_iterator.hpp> namespace boost { namespace fusion
namespace boost { namespace fusion { namespace extension
{ {
template <typename> struct map_tag;
struct begin_impl;
template <> namespace extension
struct begin_impl<map_tag>
{ {
template <typename Seq> template<typename T>
struct apply struct begin_impl;
{
typedef
basic_iterator<
map_iterator_tag
, typename Seq::category
, Seq
, 0
>
type;
static type template<>
call(Seq& seq) struct begin_impl<map_tag>
{
template<typename Sequence>
struct apply
{ {
return type(seq,0); typedef map_iterator<Sequence, 0> type;
}
static type call(Sequence& seq)
{
return type(seq);
}
};
}; };
}; }
}}} }}
#endif #endif

View File

@ -0,0 +1,75 @@
/*=============================================================================
Copyright (c) 2005-2013 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_BUILD_MAP_02042013_1448)
#define BOOST_FUSION_BUILD_MAP_02042013_1448
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/value_of.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/container/map/map.hpp>
#include <boost/fusion/algorithm/transformation/push_front.hpp>
namespace boost { namespace fusion { namespace detail
{
template <typename First, typename Last
, bool is_empty = result_of::equal_to<First, Last>::value>
struct build_map;
template <typename First, typename Last>
struct build_map<First, Last, true>
{
typedef map<> type;
static type
call(First const&, Last const&)
{
return type();
}
};
template <typename T, typename Rest>
struct push_front_map;
template <typename T, typename ...Rest>
struct push_front_map<T, map<Rest...>>
{
typedef map<T, Rest...> type;
static type
call(T const& first, map<Rest...> const& rest)
{
return type(push_front(rest, first));
}
};
template <typename First, typename Last>
struct build_map<First, Last, false>
{
typedef
build_map<typename result_of::next<First>::type, Last>
next_build_map;
typedef push_front_map<
typename result_of::value_of<First>::type
, typename next_build_map::type>
push_front;
typedef typename push_front::type type;
static type
call(First const& f, Last const& l)
{
typename result_of::value_of<First>::type v = *f;
return push_front::call(
v, next_build_map::call(fusion::next(f), l));
}
};
}}}
#endif

View File

@ -15,7 +15,7 @@
#include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/inc.hpp> #include <boost/preprocessor/inc.hpp>
#include <boost/preprocessor/dec.hpp> #include <boost/preprocessor/dec.hpp>
#include <boost/fusion/container/map/map.hpp> #include <boost/fusion/container/map/detail/cpp03/map.hpp>
#include <boost/fusion/iterator/value_of.hpp> #include <boost/fusion/iterator/value_of.hpp>
#include <boost/fusion/iterator/deref.hpp> #include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/iterator/next.hpp> #include <boost/fusion/iterator/next.hpp>
@ -44,7 +44,7 @@ namespace boost { namespace fusion { namespace detail
}}} }}}
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/map/detail/preprocessed/as_map.hpp> #include <boost/fusion/container/map/detail/cpp03/preprocessed/as_map.hpp>
#else #else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_map" FUSION_MAX_MAP_SIZE_STR ".hpp") #pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_map" FUSION_MAX_MAP_SIZE_STR ".hpp")
@ -77,7 +77,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \ typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
BOOST_PP_CAT(T, n); BOOST_PP_CAT(T, n);
#define BOOST_PP_FILENAME_1 <boost/fusion/container/map/detail/as_map.hpp> #define BOOST_PP_FILENAME_1 <boost/fusion/container/map/detail/cpp03/as_map.hpp>
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
#include BOOST_PP_ITERATE() #include BOOST_PP_ITERATE()

View File

@ -0,0 +1,61 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2011 Brandon Kohn
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_MAP_DETAIL_AT_IMPL_HPP)
#define BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP
#include <boost/fusion/support/detail/access.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/mpl/at.hpp>
#include <boost/mpl/int.hpp>
namespace boost { namespace fusion
{
struct map_tag;
namespace extension
{
template <typename Tag>
struct at_impl;
template <>
struct at_impl<map_tag>
{
template <typename Sequence, typename N>
struct apply
{
typedef typename
mpl::at<typename Sequence::storage_type::types, N>::type
element;
typedef typename detail::ref_result<element>::type type;
static type
call(Sequence& m)
{
return m.get_data().at_impl(N());
}
};
template <typename Sequence, typename N>
struct apply<Sequence const, N>
{
typedef typename
mpl::at<typename Sequence::storage_type::types, N>::type
element;
typedef typename detail::cref_result<element>::type type;
static type
call(Sequence const& m)
{
return m.get_data().at_impl(N());
}
};
};
}
}}
#endif //BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP

View File

@ -0,0 +1,43 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2009 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_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP
#define BOOST_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP
#include <boost/fusion/iterator/basic_iterator.hpp>
namespace boost { namespace fusion { namespace extension
{
template <typename>
struct begin_impl;
template <>
struct begin_impl<map_tag>
{
template <typename Seq>
struct apply
{
typedef
basic_iterator<
map_iterator_tag
, typename Seq::category
, Seq
, 0
>
type;
static type
call(Seq& seq)
{
return type(seq,0);
}
};
};
}}}
#endif

View File

@ -0,0 +1,47 @@
/*=============================================================================
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_CONVERT_09232005_1340)
#define FUSION_CONVERT_09232005_1340
#include <boost/fusion/container/map/detail/cpp03/as_map.hpp>
#include <boost/fusion/container/map/detail/cpp03/convert_impl.hpp>
#include <boost/fusion/container/map/detail/cpp03/map.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence>
struct as_map
{
typedef typename detail::as_map<result_of::size<Sequence>::value> gen;
typedef typename gen::
template apply<typename result_of::begin<Sequence>::type>::type
type;
};
}
template <typename Sequence>
inline typename result_of::as_map<Sequence>::type
as_map(Sequence& seq)
{
typedef typename result_of::as_map<Sequence>::gen gen;
return gen::call(fusion::begin(seq));
}
template <typename Sequence>
inline typename result_of::as_map<Sequence const>::type
as_map(Sequence const& seq)
{
typedef typename result_of::as_map<Sequence const>::gen gen;
return gen::call(fusion::begin(seq));
}
}}
#endif

View File

@ -8,8 +8,8 @@
#if !defined(FUSION_CONVERT_IMPL_09232005_1340) #if !defined(FUSION_CONVERT_IMPL_09232005_1340)
#define FUSION_CONVERT_IMPL_09232005_1340 #define FUSION_CONVERT_IMPL_09232005_1340
#include <boost/fusion/container/map/detail/as_map.hpp> #include <boost/fusion/container/map/detail/cpp03/as_map.hpp>
#include <boost/fusion/container/map/map.hpp> #include <boost/fusion/container/map/detail/cpp03/map.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp> #include <boost/fusion/sequence/intrinsic/size.hpp>

View File

@ -0,0 +1,43 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2009 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_CONTAINER_MAP_DETAIL_END_IMPL_HPP
#define BOOST_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP
#include <boost/fusion/iterator/basic_iterator.hpp>
namespace boost { namespace fusion { namespace extension
{
template <typename>
struct end_impl;
template <>
struct end_impl<map_tag>
{
template <typename Seq>
struct apply
{
typedef
basic_iterator<
map_iterator_tag
, typename Seq::category
, Seq
, Seq::size::value
>
type;
static type
call(Seq& seq)
{
return type(seq,0);
}
};
};
}}}
#endif

View File

@ -8,7 +8,7 @@
#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP #ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP
#define BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP #define BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP
#include <boost/fusion/container/map/detail/value_of_impl.hpp> #include <boost/fusion/container/map/detail/cpp03/value_of_impl.hpp>
namespace boost { namespace fusion { namespace extension namespace boost { namespace fusion { namespace extension
{ {

View File

@ -0,0 +1,104 @@
/*=============================================================================
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_MAP_07212005_1106)
#define FUSION_MAP_07212005_1106
#include <boost/fusion/support/pair.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/container/map/detail/cpp03/map_fwd.hpp>
#include <boost/fusion/container/map/detail/cpp03/at_impl.hpp>
#include <boost/fusion/container/map/detail/cpp03/value_at_impl.hpp>
#include <boost/fusion/container/map/detail/cpp03/begin_impl.hpp>
#include <boost/fusion/container/map/detail/cpp03/end_impl.hpp>
#include <boost/fusion/container/map/detail/cpp03/value_of_impl.hpp>
#include <boost/fusion/container/map/detail/cpp03/deref_data_impl.hpp>
#include <boost/fusion/container/map/detail/cpp03/deref_impl.hpp>
#include <boost/fusion/container/map/detail/cpp03/key_of_impl.hpp>
#include <boost/fusion/container/map/detail/cpp03/value_of_data_impl.hpp>
#include <boost/fusion/container/vector/vector.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/bool.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/map/detail/cpp03/preprocessed/map.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/map" FUSION_MAX_MAP_SIZE_STR ".hpp")
#endif
/*=============================================================================
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
namespace boost { namespace fusion
{
struct void_;
struct fusion_sequence_tag;
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, typename T)>
struct map : sequence_base<map<BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> >
{
struct category : random_access_traversal_tag, associative_tag {};
typedef map_tag fusion_tag;
typedef fusion_sequence_tag tag; // this gets picked up by MPL
typedef mpl::false_ is_view;
typedef vector<
BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)>
storage_type;
typedef typename storage_type::size size;
map()
: data() {}
template <typename Sequence>
map(Sequence const& rhs)
: data(rhs) {}
#include <boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp>
template <typename T>
map& operator=(T const& rhs)
{
data = rhs;
return *this;
}
map& operator=(map const& rhs)
{
data = rhs.data;
return *this;
}
storage_type& get_data() { return data; }
storage_type const& get_data() const { return data; }
private:
storage_type data;
};
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif

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