diff --git a/include/boost/fusion/adapted.hpp b/include/boost/fusion/adapted.hpp index bcff7161..6c9589d5 100644 --- a/include/boost/fusion/adapted.hpp +++ b/include/boost/fusion/adapted.hpp @@ -18,7 +18,7 @@ // The std_tuple_iterator adaptor only supports implementations // using variadic templates -#if !defined(BOOST_NO_VARIADIC_TEMPLATES) +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #include #endif diff --git a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp index bc05e9a8..c06b61b5 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -36,7 +36,7 @@ // an alternate implementation for these metafunctions is used that does not // require such specializations. The alternate implementation takes longer // 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 // to report a bug. #if defined(BOOST_MSVC) || (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ <= 4))) diff --git a/include/boost/fusion/algorithm/auxiliary/copy.hpp b/include/boost/fusion/algorithm/auxiliary/copy.hpp index fd866468..c69e4bd5 100644 --- a/include/boost/fusion/algorithm/auxiliary/copy.hpp +++ b/include/boost/fusion/algorithm/auxiliary/copy.hpp @@ -69,7 +69,7 @@ namespace boost { namespace fusion copy(Seq1 const& src, Seq2& dest) { BOOST_STATIC_ASSERT( - result_of::size::value == result_of::size::value); + result_of::size::value <= result_of::size::value); detail::sequence_copy< Seq1 const, Seq2>:: diff --git a/include/boost/fusion/algorithm/auxiliary/move.hpp b/include/boost/fusion/algorithm/auxiliary/move.hpp new file mode 100644 index 00000000..68422da9 --- /dev/null +++ b/include/boost/fusion/algorithm/auxiliary/move.hpp @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined (BOOST_MSVC) +# pragma warning(push) +# pragma warning (disable: 4100) // unreferenced formal parameter +#endif + +namespace boost { namespace fusion +{ + namespace detail + { + template + struct sequence_move + { + typedef typename result_of::end::type end1_type; + typedef typename result_of::end::type end2_type; + + template + static void + call(I1 const&, I2 const&, mpl::true_) + { + } + + template + static void + call(I1 const& src, I2 const& dest, mpl::false_) + { + *dest = std::move(*src); + call(fusion::next(src), fusion::next(dest)); + } + + template + static void + call(I1 const& src, I2 const& dest) + { + typename result_of::equal_to::type eq; + return call(src, dest, eq); + } + }; + } + + template + inline + typename + enable_if_c< + type_traits::ice_and< + traits::is_sequence::value + , traits::is_sequence::value + >::value, + void + >::type + move(Seq1&& src, Seq2& dest) + { + BOOST_STATIC_ASSERT( + result_of::size::value <= result_of::size::value); + + detail::sequence_move< + Seq1, Seq2>:: + call(fusion::begin(src), fusion::begin(dest)); + } +}} + +#if defined (BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif diff --git a/include/boost/fusion/container/deque.hpp b/include/boost/fusion/container/deque.hpp index 0ee058a3..d750eab6 100644 --- a/include/boost/fusion/container/deque.hpp +++ b/include/boost/fusion/container/deque.hpp @@ -8,6 +8,7 @@ #if !defined(BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036) #define BOOST_FUSION_SEQUENCE_CONTAINER_DEQUE_24112006_2036 +#include #include #include diff --git a/include/boost/fusion/container/deque/back_extended_deque.hpp b/include/boost/fusion/container/deque/back_extended_deque.hpp index 738e05bb..81728231 100644 --- a/include/boost/fusion/container/deque/back_extended_deque.hpp +++ b/include/boost/fusion/container/deque/back_extended_deque.hpp @@ -31,7 +31,7 @@ namespace boost { namespace fusion : base(val, deque) {} -#if defined(BOOST_NO_RVALUE_REFERENCES) +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template back_extended_deque(Deque const& deque, Arg& val) : base(val, deque) diff --git a/include/boost/fusion/container/deque/convert.hpp b/include/boost/fusion/container/deque/convert.hpp index 1910cb84..0dc1dc0a 100644 --- a/include/boost/fusion/container/deque/convert.hpp +++ b/include/boost/fusion/container/deque/convert.hpp @@ -1,5 +1,5 @@ /*============================================================================= - Copyright (c) 2005-2012 Joel de Guzman + Copyright (c) 2005-2013 Joel de Guzman Copyright (c) 2006 Dan Marsden Distributed under the Boost Software License, Version 1.0. (See accompanying @@ -8,25 +8,32 @@ #if !defined(FUSION_CONVERT_20061213_2207) #define FUSION_CONVERT_20061213_2207 -#include #include #include -#include -#include + +#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) +/////////////////////////////////////////////////////////////////////////////// +// C++03 (non-variadic) implementation +/////////////////////////////////////////////////////////////////////////////// +#include + +#else +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic implementation +/////////////////////////////////////////////////////////////////////////////// +#include namespace boost { namespace fusion { namespace result_of { template - struct as_deque + struct as_deque : + detail::build_deque< + typename result_of::begin::type + , typename result_of::end::type + > { - typedef typename - detail::as_deque::value> - gen; - typedef typename gen:: - template apply::type>::type - type; }; } @@ -34,17 +41,18 @@ namespace boost { namespace fusion inline typename result_of::as_deque::type as_deque(Sequence& seq) { - typedef typename result_of::as_deque::gen gen; - return gen::call(fusion::begin(seq)); + typedef result_of::as_deque gen; + return gen::call(fusion::begin(seq), fusion::end(seq)); } template inline typename result_of::as_deque::type as_deque(Sequence const& seq) { - typedef typename result_of::as_deque::gen gen; - return gen::call(fusion::begin(seq)); + typedef result_of::as_deque gen; + return gen::call(fusion::begin(seq), fusion::end(seq)); } }} #endif +#endif diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index 057064a0..96b2978c 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -8,26 +8,23 @@ #if !defined(BOOST_FUSION_DEQUE_26112006_1649) #define BOOST_FUSION_DEQUE_26112006_1649 -#include +# include /////////////////////////////////////////////////////////////////////////////// -// With variadics, we will use the PP version +// Without variadics, we will use the PP version /////////////////////////////////////////////////////////////////////////////// -#if defined(BOOST_NO_VARIADIC_TEMPLATES) -# include +#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) +# include #else -# if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) -# define BOOST_FUSION_HAS_VARIADIC_DEQUE -# endif /////////////////////////////////////////////////////////////////////////////// -// C++11 variadic interface +// C++11 interface /////////////////////////////////////////////////////////////////////////////// #include #include #include #include -#include +#include #include #include #include @@ -93,7 +90,7 @@ namespace boost { namespace fusion : base(seq) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template deque(deque&& seq) : base(std::forward>(seq)) @@ -104,7 +101,7 @@ namespace boost { namespace fusion : base(seq) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) deque(deque&& seq) : base(std::forward(seq)) {} @@ -119,7 +116,7 @@ namespace boost { namespace fusion : base(detail::deque_keyed_values::construct(head, tail...)) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template explicit deque(Head_&& head, Tail_&&... tail) : base(detail::deque_keyed_values @@ -147,7 +144,7 @@ namespace boost { namespace fusion return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template deque& operator=(T&& rhs) { diff --git a/include/boost/fusion/container/deque/deque_fwd.hpp b/include/boost/fusion/container/deque/deque_fwd.hpp index fc1f9cbd..2112ed0a 100644 --- a/include/boost/fusion/container/deque/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/deque_fwd.hpp @@ -13,10 +13,10 @@ /////////////////////////////////////////////////////////////////////////////// // With no decltype and variadics, we will use the C++03 version /////////////////////////////////////////////////////////////////////////////// -#if (defined(BOOST_NO_DECLTYPE) \ - || defined(BOOST_NO_VARIADIC_TEMPLATES) \ - || defined(BOOST_NO_RVALUE_REFERENCES)) -# include +#if (defined(BOOST_NO_CXX11_DECLTYPE) \ + || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \ + || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)) +# include #else # if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) # define BOOST_FUSION_HAS_VARIADIC_DEQUE diff --git a/include/boost/fusion/container/deque/detail/build_deque.hpp b/include/boost/fusion/container/deque/detail/build_deque.hpp new file mode 100644 index 00000000..bd713f9f --- /dev/null +++ b/include/boost/fusion/container/deque/detail/build_deque.hpp @@ -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 +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template ::value> + struct build_deque; + + template + struct build_deque + { + typedef deque<> type; + static type + call(First const&, Last const&) + { + return type(); + } + }; + + template + struct push_front_deque; + + template + struct push_front_deque> + { + typedef deque type; + + static type + call(T const& first, deque const& rest) + { + return type(front_extended_deque, T>(rest, first)); + } + }; + + template + struct build_deque + { + typedef + build_deque::type, Last> + next_build_deque; + + typedef push_front_deque< + typename result_of::value_of::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::type v = *f; + return push_front::call( + v, next_build_deque::call(fusion::next(f), l)); + } + }; +}}} + +#endif diff --git a/include/boost/fusion/container/deque/detail/convert_impl.hpp b/include/boost/fusion/container/deque/detail/convert_impl.hpp index 1401ef1a..5dff927a 100644 --- a/include/boost/fusion/container/deque/detail/convert_impl.hpp +++ b/include/boost/fusion/container/deque/detail/convert_impl.hpp @@ -8,7 +8,7 @@ #if !defined(FUSION_CONVERT_IMPL_20061213_2207) #define FUSION_CONVERT_IMPL_20061213_2207 -#include +#include #include #include #include @@ -17,6 +17,12 @@ namespace boost { namespace fusion { struct deque_tag; + namespace result_of + { + template + struct as_deque; + } + namespace extension { template @@ -28,14 +34,11 @@ namespace boost { namespace fusion template struct apply { - typedef detail::as_deque::value> gen; - typedef typename gen:: - template apply::type>::type - type; - + typedef result_of::as_deque gen; + typedef typename gen::type type; static type call(Sequence& seq) { - return gen::call(fusion::begin(seq)); + return gen::call(seq); } }; }; diff --git a/include/boost/fusion/container/deque/detail/as_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/as_deque.hpp similarity index 98% rename from include/boost/fusion/container/deque/detail/as_deque.hpp rename to include/boost/fusion/container/deque/detail/cpp03/as_deque.hpp index 906f4fb6..85b377f8 100644 --- a/include/boost/fusion/container/deque/detail/as_deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/as_deque.hpp @@ -45,7 +45,7 @@ namespace boost { namespace fusion { namespace detail }}} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #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") @@ -78,7 +78,7 @@ namespace boost { namespace fusion { namespace detail typedef typename fusion::result_of::value_of::type \ BOOST_PP_CAT(T, n); -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/deque/detail/cpp03/build_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/build_deque.hpp new file mode 100644 index 00000000..2dcce7d6 --- /dev/null +++ b/include/boost/fusion/container/deque/detail/cpp03/build_deque.hpp @@ -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 +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct as_deque + { + typedef typename + detail::as_deque::value> + gen; + typedef typename gen:: + template apply::type>::type + type; + }; + } + + template + inline typename result_of::as_deque::type + as_deque(Sequence& seq) + { + typedef typename result_of::as_deque::gen gen; + return gen::call(fusion::begin(seq)); + } + + template + inline typename result_of::as_deque::type + as_deque(Sequence const& seq) + { + typedef typename result_of::as_deque::gen gen; + return gen::call(fusion::begin(seq)); + } +}} + +#endif diff --git a/include/boost/fusion/container/deque/detail/pp_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp similarity index 78% rename from include/boost/fusion/container/deque/detail/pp_deque.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque.hpp index 7913b67b..e1a547c6 100644 --- a/include/boost/fusion/container/deque/detail/pp_deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp @@ -12,11 +12,11 @@ #error "C++03 only! This file should not have been included" #endif -#include +#include #include #include -#include -#include +#include +#include #include #include #include @@ -40,10 +40,10 @@ #include #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #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 /*============================================================================= @@ -78,7 +78,7 @@ namespace boost { namespace fusion { mpl::if_ >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down; typedef mpl::false_ is_view; -#include +#include deque() {} @@ -91,9 +91,12 @@ namespace boost { namespace fusion { : base(rhs) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) - explicit deque(T0&& t0) - : base(std::forward(t0), detail::nil_keyed_element()) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template + explicit deque(T0_&& t0 + , typename enable_if >::type* /*dummy*/ = 0 + ) + : base(std::forward(t0), detail::nil_keyed_element()) {} explicit deque(deque&& rhs) @@ -106,7 +109,7 @@ namespace boost { namespace fusion { : base(seq) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template deque(deque&& seq) : base(std::forward>(seq)) @@ -134,7 +137,7 @@ namespace boost { namespace fusion { return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template deque& operator=(T&& rhs) @@ -145,6 +148,28 @@ namespace boost { namespace fusion { #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 + deque(Sequence const&, + typename enable_if< + mpl::and_< + traits::is_sequence + , result_of::empty > >::type* /*dummy*/ = 0) + {} + + deque() {} + }; + }} #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) diff --git a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp similarity index 75% rename from include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp index 44d279f6..b049d76e 100644 --- a/include/boost/fusion/container/deque/detail/deque_forward_ctor.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp @@ -13,14 +13,14 @@ #error "C++03 only! This file should not have been included" #endif -#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward(t##n) +#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward(t##n) #include #include #include #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() @@ -30,14 +30,21 @@ #define N BOOST_PP_ITERATION() +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference::type>::type t)) : base(detail::deque_keyed_values::construct(BOOST_PP_ENUM_PARAMS(N, t))) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) -deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && t)) +#else + +deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& t)) + : base(detail::deque_keyed_values::construct(BOOST_PP_ENUM_PARAMS(N, t))) +{} + +template +deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t)) : base(detail::deque_keyed_values:: - forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _))) + forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _))) {} #endif diff --git a/include/boost/fusion/container/deque/detail/pp_deque_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_fwd.hpp similarity index 87% rename from include/boost/fusion/container/deque/detail/pp_deque_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque_fwd.hpp index 354cfccd..0da8bd22 100644 --- a/include/boost/fusion/container/deque/detail/pp_deque_fwd.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_fwd.hpp @@ -12,14 +12,14 @@ #error "C++03 only! This file should not have been included" #endif -#include +#include #include #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #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 /*============================================================================= diff --git a/include/boost/fusion/container/deque/detail/deque_initial_size.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp similarity index 96% rename from include/boost/fusion/container/deque/detail/deque_initial_size.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp index 21075ef4..5ac245d9 100644 --- a/include/boost/fusion/container/deque/detail/deque_initial_size.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp @@ -25,7 +25,7 @@ namespace boost { namespace fusion }} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #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") diff --git a/include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp similarity index 92% rename from include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp index a7c4939a..13ec1da7 100644 --- a/include/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp @@ -12,7 +12,7 @@ #error "C++03 only! This file should not have been included" #endif -#include +#include #include #include @@ -34,7 +34,7 @@ namespace boost { namespace fusion }} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #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") @@ -68,7 +68,7 @@ namespace boost { namespace fusion { namespace detail { typedef nil_keyed_element type; - static type call() + static type construct() { return type(); } @@ -89,7 +89,7 @@ namespace boost { namespace fusion { namespace detail BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type tail; typedef keyed_element type; -#include +#include }; diff --git a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp similarity index 78% rename from include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp rename to include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp index d457516f..7be11319 100644 --- a/include/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp @@ -19,10 +19,10 @@ #include #define FUSION_DEQUE_KEYED_VALUES_FORWARD(z, n, _) \ - std::forward(BOOST_PP_CAT(t, n)) + std::forward(BOOST_PP_CAT(t, n)) #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE) #include BOOST_PP_ITERATE() @@ -40,19 +40,22 @@ #if N > 1 , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T) #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 + static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t)) { - return type(std::forward(t0), + return type(std::forward(t0), deque_keyed_values_impl< next_index #if N > 1 - , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T) + , BOOST_PP_ENUM_SHIFTED_PARAMS(N, T_) #endif >::forward_(BOOST_PP_ENUM_SHIFTED(N, FUSION_DEQUE_KEYED_VALUES_FORWARD, _))); } +#endif #undef N #endif diff --git a/include/boost/fusion/container/deque/limits.hpp b/include/boost/fusion/container/deque/detail/cpp03/limits.hpp similarity index 100% rename from include/boost/fusion/container/deque/limits.hpp rename to include/boost/fusion/container/deque/detail/cpp03/limits.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque.hpp similarity index 62% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque.hpp index f383bea2..abc2890a 100644 --- a/include/boost/fusion/container/deque/detail/preprocessed/as_deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_DEQUE_SIZE <= 10 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 20 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 30 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 40 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque10.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque10.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque10.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque10.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque20.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque20.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque20.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque20.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque30.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque30.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque30.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque30.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque40.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque40.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque40.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque40.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/as_deque50.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque50.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/as_deque50.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque50.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp similarity index 62% rename from include/boost/fusion/container/deque/detail/preprocessed/deque.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp index 404d20b7..3a5a21e2 100644 --- a/include/boost/fusion/container/deque/detail/preprocessed/deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_DEQUE_SIZE <= 10 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 20 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 30 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 40 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque10.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque10.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque10_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque10_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque20.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque20.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque20_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque20_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque30.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque30.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque30_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque30_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque40.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque40.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque40_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque40_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque50.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque50.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque50_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50_fwd.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque50_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50_fwd.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_fwd.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_fwd.hpp similarity index 61% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_fwd.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_fwd.hpp index a0b75b7c..9a770b9e 100644 --- a/include/boost/fusion/container/deque/detail/preprocessed/deque_fwd.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_fwd.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_DEQUE_SIZE <= 10 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 20 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 30 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 40 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size.hpp similarity index 59% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size.hpp index a26dfdb2..9431abe2 100644 --- a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_DEQUE_SIZE <= 10 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 20 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 30 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 40 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size10.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size10.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size10.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size10.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size20.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size20.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size20.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size20.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size30.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size30.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size30.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size30.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size40.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size40.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size40.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size40.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size50.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size50.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_initial_size50.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_initial_size50.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values.hpp similarity index 59% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values.hpp index 2460dda5..6e796865 100644 --- a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_DEQUE_SIZE <= 10 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 20 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 30 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 40 -#include +#include #elif FUSION_MAX_DEQUE_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_DEQUE_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values10.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values10.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values10.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values10.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values20.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values20.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values20.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values20.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values30.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values30.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values30.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values30.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values40.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values40.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values40.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values40.hpp diff --git a/include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values50.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values50.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/preprocessed/deque_keyed_values50.hpp rename to include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values50.hpp diff --git a/include/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp b/include/boost/fusion/container/deque/detail/deque_keyed_values.hpp similarity index 100% rename from include/boost/fusion/container/deque/detail/variadic_deque_keyed_values.hpp rename to include/boost/fusion/container/deque/detail/deque_keyed_values.hpp diff --git a/include/boost/fusion/container/deque/detail/keyed_element.hpp b/include/boost/fusion/container/deque/detail/keyed_element.hpp index e5bdc2ab..f468020b 100644 --- a/include/boost/fusion/container/deque/detail/keyed_element.hpp +++ b/include/boost/fusion/container/deque/detail/keyed_element.hpp @@ -51,7 +51,7 @@ namespace boost { namespace fusion { namespace detail : 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) : Rest(std::forward(rhs.forward_base())) , value_(std::forward(rhs.value_)) @@ -63,7 +63,7 @@ namespace boost { namespace fusion { namespace detail : Rest(rhs.get_base()), value_(rhs.value_) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #endif Rest& get_base() @@ -76,7 +76,7 @@ namespace boost { namespace fusion { namespace detail return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) Rest&& forward_base() { return std::forward(*static_cast(this)); @@ -99,7 +99,7 @@ namespace boost { namespace fusion { namespace detail : Rest(rest), value_(value) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) keyed_element(Value&& value, Rest&& rest) : Rest(std::forward(rest)) , value_(std::forward(value)) @@ -125,7 +125,7 @@ namespace boost { namespace fusion { namespace detail return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) keyed_element& operator=(keyed_element&& rhs) { base::operator=(std::forward(rhs)); diff --git a/include/boost/fusion/container/deque/front_extended_deque.hpp b/include/boost/fusion/container/deque/front_extended_deque.hpp index 2f3654ed..3b8501a9 100644 --- a/include/boost/fusion/container/deque/front_extended_deque.hpp +++ b/include/boost/fusion/container/deque/front_extended_deque.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion : base(val, deque) {} -#if defined(BOOST_NO_RVALUE_REFERENCES) +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template front_extended_deque(Deque const& deque, Arg& val) : base(val, deque) diff --git a/include/boost/fusion/container/generation/cons_tie.hpp b/include/boost/fusion/container/generation/cons_tie.hpp index 4459e0c3..e42b4202 100644 --- a/include/boost/fusion/container/generation/cons_tie.hpp +++ b/include/boost/fusion/container/generation/cons_tie.hpp @@ -11,11 +11,11 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; namespace result_of { - template + template struct cons_tie { typedef cons type; diff --git a/include/boost/fusion/container/generation/deque_tie.hpp b/include/boost/fusion/container/generation/deque_tie.hpp index ea0afb92..d8e5fde1 100644 --- a/include/boost/fusion/container/generation/deque_tie.hpp +++ b/include/boost/fusion/container/generation/deque_tie.hpp @@ -1,41 +1,23 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2006 Dan Marsden + 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_DEQUE_TIE_07192005_1242) -#define FUSION_DEQUE_TIE_07192005_1242 +#if !defined(FUSION_DEQUE_TIE_01272013_1401) +#define FUSION_DEQUE_TIE_01272013_1401 -#include -#include -#include -#include -#include -#include #include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) +# include #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 - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +#include namespace boost { namespace fusion { @@ -43,63 +25,21 @@ namespace boost { namespace fusion 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 -#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 + struct deque_tie { - template -#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 -#endif - { - typedef deque type; + typedef deque type; }; } - template - inline deque - deque_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) + template + inline deque + deque_tie(T&... arg) { - return deque( - BOOST_PP_ENUM_PARAMS(N, _)); + return deque(arg...); } + }} -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) +#endif +#endif diff --git a/include/boost/fusion/container/generation/detail/pp_deque_tie.hpp b/include/boost/fusion/container/generation/detail/pp_deque_tie.hpp new file mode 100644 index 00000000..174b58b0 --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_deque_tie.hpp @@ -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 +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#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 +#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 +#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 +#endif + { + typedef deque type; + }; + } + + template + inline deque + deque_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & _)) + { + return deque( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/detail/pp_make_deque.hpp b/include/boost/fusion/container/generation/detail/pp_make_deque.hpp new file mode 100644 index 00000000..ca478635 --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_make_deque.hpp @@ -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 +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#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::type + +#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ + typename detail::as_fusion_element::type + +#define BOOST_PP_FILENAME_1 +#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 +#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 +#endif + { + typedef deque type; + }; + } + + template + inline deque + make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) + { + return deque( + BOOST_PP_ENUM_PARAMS(N, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/detail/pp_make_map.hpp b/include/boost/fusion/container/generation/detail/pp_make_map.hpp new file mode 100644 index 00000000..9bea617f --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_make_map.hpp @@ -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 +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#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::type> + +#define BOOST_FUSION_MAKE_PAIR(z, n, data) \ + fusion::make_pair(BOOST_PP_CAT(_, n)) \ + +#define BOOST_PP_FILENAME_1 +#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 + #undef TEXT +#else + struct make_map +#endif + { + typedef map type; + }; + } + + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename D) + > + inline map + make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& _)) + { + return map( + BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/detail/pp_map_tie.hpp b/include/boost/fusion/container/generation/detail/pp_map_tie.hpp new file mode 100644 index 00000000..e6287ba1 --- /dev/null +++ b/include/boost/fusion/container/generation/detail/pp_map_tie.hpp @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#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::type> + +#define BOOST_FUSION_PAIR_TIE(z, n, data) \ + fusion::pair_tie(BOOST_PP_CAT(_, n)) \ + +#define BOOST_PP_FILENAME_1 +#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 + #undef TEXT +#else + struct map_tie +#endif + { + typedef map type; + }; + } + + template < + BOOST_PP_ENUM_PARAMS(N, typename K) + , BOOST_PP_ENUM_PARAMS(N, typename D) + > + inline map + map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & _)) + { + return map( + BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, _)); + } + +#undef N +#endif // defined(BOOST_PP_IS_ITERATING) + diff --git a/include/boost/fusion/container/generation/make_cons.hpp b/include/boost/fusion/container/generation/make_cons.hpp index dcb606dc..b11394bf 100644 --- a/include/boost/fusion/container/generation/make_cons.hpp +++ b/include/boost/fusion/container/generation/make_cons.hpp @@ -13,11 +13,11 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; namespace result_of { - template + template struct make_cons { typedef cons::type, Cdr> type; diff --git a/include/boost/fusion/container/generation/make_deque.hpp b/include/boost/fusion/container/generation/make_deque.hpp index fdc7dce7..bc28b1dd 100644 --- a/include/boost/fusion/container/generation/make_deque.hpp +++ b/include/boost/fusion/container/generation/make_deque.hpp @@ -1,124 +1,43 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2006 Dan Marsden + 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) ==============================================================================*/ -/*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman +#if !defined(FUSION_MAKE_DEQUE_01272013_1401) +#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 -#include -#include -#include -#include #include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) +# include #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 - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - This is an auto-generated file. Do not edit! -==============================================================================*/ - -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(preserve: 1) -#endif +#include 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<> + template + struct make_deque { - typedef deque<> type; + typedef deque type; }; } - inline deque<> - make_deque() + template + inline deque::type...> + make_deque(T const&... arg) { - return deque<>(); + return deque::type...>(arg...); } - -#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \ - typename detail::as_fusion_element::type - -#define BOOST_PP_FILENAME_1 -#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 -#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 -#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 -#endif - { - typedef deque type; - }; - } - - template - inline deque - make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _)) - { - return deque( - BOOST_PP_ENUM_PARAMS(N, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - diff --git a/include/boost/fusion/container/generation/make_map.hpp b/include/boost/fusion/container/generation/make_map.hpp index 08938d4c..5f765341 100644 --- a/include/boost/fusion/container/generation/make_map.hpp +++ b/include/boost/fusion/container/generation/make_map.hpp @@ -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 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) #define FUSION_MAKE_MAP_07222005_1247 -#include -#include -#include -#include -#include #include + +#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) +# include +#else + +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// #include #include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#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<> + template + struct make_map { - typedef map<> type; + template + struct apply + { + typedef map< + fusion::pair< + Key + , typename detail::as_fusion_element::type + >...> + type; + }; }; } - inline map<> - make_map() + template + inline map< + fusion::pair< + Key + , typename detail::as_fusion_element::type + >...> + make_map(T const&... arg) { - return map<>(); + typedef map< + fusion::pair< + Key + , typename detail::as_fusion_element::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::type> - -#define BOOST_FUSION_MAKE_PAIR(z, n, data) \ - fusion::make_pair(BOOST_PP_CAT(_, n)) \ - -#define BOOST_PP_FILENAME_1 -#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 - #undef TEXT -#else - struct make_map -#endif - { - typedef map type; - }; - } - - template < - BOOST_PP_ENUM_PARAMS(N, typename K) - , BOOST_PP_ENUM_PARAMS(N, typename D) - > - inline map - make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& _)) - { - return map( - BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - +#endif \ No newline at end of file diff --git a/include/boost/fusion/container/generation/map_tie.hpp b/include/boost/fusion/container/generation/map_tie.hpp index 26fc2dfa..28011b44 100644 --- a/include/boost/fusion/container/generation/map_tie.hpp +++ b/include/boost/fusion/container/generation/map_tie.hpp @@ -1,136 +1,46 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2006 Dan Marsden + 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) ==============================================================================*/ -#ifndef BOOST_PP_IS_ITERATING -#if !defined(FUSION_MAP_TIE_20060814_1116) -#define FUSION_MAP_TIE_20060814_1116 +#if !defined(FUSION_MAP_TIE_07222005_1247) +#define FUSION_MAP_TIE_07222005_1247 -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) +# include #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 +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic interface +/////////////////////////////////////////////////////////////////////////////// +#include 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<> + template + struct map_tie { - typedef map<> type; + template + struct apply + { + typedef map...> type; + }; }; } - inline map<> - map_tie() + template + inline map...> + map_tie(T&... arg) { - return map<>(); + typedef map...> result_type; + return result_type(arg...); } - -#define BOOST_FUSION_TIED_PAIR(z, n, data) \ - fusion::pair< \ - BOOST_PP_CAT(K, n) \ - , typename add_reference::type> - -#define BOOST_FUSION_PAIR_TIE(z, n, data) \ - fusion::pair_tie(BOOST_PP_CAT(_, n)) \ - -#define BOOST_PP_FILENAME_1 -#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 - #undef TEXT -#else - struct map_tie -#endif - { - typedef map type; - }; - } - - template < - BOOST_PP_ENUM_PARAMS(N, typename K) - , BOOST_PP_ENUM_PARAMS(N, typename D) - > - inline map - map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & _)) - { - return map( - BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, _)); - } - -#undef N -#endif // defined(BOOST_PP_IS_ITERATING) - +#endif \ No newline at end of file diff --git a/include/boost/fusion/container/list/cons.hpp b/include/boost/fusion/container/list/cons.hpp index 666b5367..8a04049f 100644 --- a/include/boost/fusion/container/list/cons.hpp +++ b/include/boost/fusion/container/list/cons.hpp @@ -34,7 +34,7 @@ namespace boost { namespace fusion struct forward_traversal_tag; struct fusion_sequence_tag; - struct nil : sequence_base + struct nil_ : sequence_base { typedef mpl::int_<0> size; typedef cons_tag fusion_tag; @@ -44,10 +44,10 @@ namespace boost { namespace fusion typedef void_ car_type; typedef void_ cdr_type; - nil() {} + nil_() {} template - nil(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/) + nil_(Iterator const& /*iter*/, mpl::true_ /*this_is_an_iterator*/) {} template @@ -56,7 +56,7 @@ namespace boost { namespace fusion } }; - template + template struct cons : sequence_base > { typedef mpl::int_ size; diff --git a/include/boost/fusion/container/list/cons_fwd.hpp b/include/boost/fusion/container/list/cons_fwd.hpp index 80bb0443..4ec558ff 100644 --- a/include/boost/fusion/container/list/cons_fwd.hpp +++ b/include/boost/fusion/container/list/cons_fwd.hpp @@ -10,9 +10,12 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; + #ifndef nil + typedef nil_ nil; + #endif - template + template struct cons; }} diff --git a/include/boost/fusion/container/list/cons_iterator.hpp b/include/boost/fusion/container/list/cons_iterator.hpp index bc4fa094..834651d5 100644 --- a/include/boost/fusion/container/list/cons_iterator.hpp +++ b/include/boost/fusion/container/list/cons_iterator.hpp @@ -18,14 +18,14 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; struct cons_iterator_tag; struct forward_traversal_tag; template struct cons_iterator_identity; - template + template struct cons_iterator : iterator_base > { typedef cons_iterator_tag fusion_tag; @@ -49,40 +49,40 @@ namespace boost { namespace fusion { typedef forward_traversal_tag category; typedef cons_iterator_tag fusion_tag; - typedef nil cons_type; + typedef nil_ cons_type; typedef cons_iterator_identity< - add_const::type> + add_const::type> identity; nil_iterator() {} - explicit nil_iterator(nil const&) {} + explicit nil_iterator(nil_ const&) {} }; template <> - struct cons_iterator : nil_iterator + struct cons_iterator : nil_iterator { cons_iterator() {} - explicit cons_iterator(nil const&) {} + explicit cons_iterator(nil_ const&) {} }; template <> - struct cons_iterator : nil_iterator + struct cons_iterator : nil_iterator { cons_iterator() {} - explicit cons_iterator(nil const&) {} + explicit cons_iterator(nil_ const&) {} }; template <> struct cons_iterator > : nil_iterator { cons_iterator() {} - explicit cons_iterator(nil const&) {} + explicit cons_iterator(nil_ const&) {} }; template <> struct cons_iterator const> : nil_iterator { cons_iterator() {} - explicit cons_iterator(nil const&) {} + explicit cons_iterator(nil_ const&) {} }; }} diff --git a/include/boost/fusion/container/list/detail/begin_impl.hpp b/include/boost/fusion/container/list/detail/begin_impl.hpp index 571e6811..27a73422 100644 --- a/include/boost/fusion/container/list/detail/begin_impl.hpp +++ b/include/boost/fusion/container/list/detail/begin_impl.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; struct cons_tag; diff --git a/include/boost/fusion/container/list/detail/build_cons.hpp b/include/boost/fusion/container/list/detail/build_cons.hpp index ef486522..725b286d 100644 --- a/include/boost/fusion/container/list/detail/build_cons.hpp +++ b/include/boost/fusion/container/list/detail/build_cons.hpp @@ -24,12 +24,12 @@ namespace boost { namespace fusion { namespace detail template struct build_cons { - typedef nil type; + typedef nil_ type; - static nil + static nil_ call(First const&, Last const&) { - return nil(); + return nil_(); } }; diff --git a/include/boost/fusion/container/list/detail/empty_impl.hpp b/include/boost/fusion/container/list/detail/empty_impl.hpp index 5c92c733..2392dd7f 100644 --- a/include/boost/fusion/container/list/detail/empty_impl.hpp +++ b/include/boost/fusion/container/list/detail/empty_impl.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { struct cons_tag; - struct nil; + struct nil_; template struct cons; @@ -28,7 +28,7 @@ namespace boost { namespace fusion { template struct apply - : boost::is_convertible + : boost::is_convertible {}; }; } diff --git a/include/boost/fusion/container/list/detail/end_impl.hpp b/include/boost/fusion/container/list/detail/end_impl.hpp index 3792250c..a2eafbaf 100644 --- a/include/boost/fusion/container/list/detail/end_impl.hpp +++ b/include/boost/fusion/container/list/detail/end_impl.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; struct cons_tag; @@ -35,7 +35,7 @@ namespace boost { namespace fusion struct apply { typedef cons_iterator< - typename mpl::if_, nil const, nil>::type> + typename mpl::if_, nil_ const, nil_>::type> type; static type diff --git a/include/boost/fusion/container/list/detail/list_to_cons.hpp b/include/boost/fusion/container/list/detail/list_to_cons.hpp index 4a7dbb83..07c11af2 100644 --- a/include/boost/fusion/container/list/detail/list_to_cons.hpp +++ b/include/boost/fusion/container/list/detail/list_to_cons.hpp @@ -18,7 +18,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; }} @@ -61,7 +61,7 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list10.hpp b/include/boost/fusion/container/list/detail/preprocessed/list10.hpp index e233b46d..d02ba872 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list10.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list10.hpp @@ -8,7 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template struct list diff --git a/include/boost/fusion/container/list/detail/preprocessed/list20.hpp b/include/boost/fusion/container/list/detail/preprocessed/list20.hpp index 405681a1..730d1c08 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list20.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list20.hpp @@ -8,7 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template struct list diff --git a/include/boost/fusion/container/list/detail/preprocessed/list30.hpp b/include/boost/fusion/container/list/detail/preprocessed/list30.hpp index 841295ef..6e6a1433 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list30.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list30.hpp @@ -8,7 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template struct list diff --git a/include/boost/fusion/container/list/detail/preprocessed/list40.hpp b/include/boost/fusion/container/list/detail/preprocessed/list40.hpp index c486f6b8..e4f3b38f 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list40.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list40.hpp @@ -8,7 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template struct list diff --git a/include/boost/fusion/container/list/detail/preprocessed/list50.hpp b/include/boost/fusion/container/list/detail/preprocessed/list50.hpp index 21264094..fc5231f2 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list50.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list50.hpp @@ -8,7 +8,7 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template struct list diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp index a0f01f51..9b9377c9 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons10.hpp @@ -81,6 +81,6 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp index b90b7a76..b142e266 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons20.hpp @@ -141,6 +141,6 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp index 8b8a046d..814b7a4f 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons30.hpp @@ -201,6 +201,6 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp index a435c021..69291485 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons40.hpp @@ -261,6 +261,6 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp index 7837e9c2..1dbef681 100644 --- a/include/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp +++ b/include/boost/fusion/container/list/detail/preprocessed/list_to_cons50.hpp @@ -321,6 +321,6 @@ namespace boost { namespace fusion { namespace detail template <> struct list_to_cons { - typedef nil type; + typedef nil_ type; }; }}} diff --git a/include/boost/fusion/container/list/detail/reverse_cons.hpp b/include/boost/fusion/container/list/detail/reverse_cons.hpp index 59178e84..5083e0c0 100644 --- a/include/boost/fusion/container/list/detail/reverse_cons.hpp +++ b/include/boost/fusion/container/list/detail/reverse_cons.hpp @@ -12,7 +12,7 @@ namespace boost { namespace fusion { namespace detail { //////////////////////////////////////////////////////////////////////////// - template + template struct reverse_cons; template @@ -29,11 +29,11 @@ namespace boost { namespace fusion { namespace detail }; template - struct reverse_cons + struct reverse_cons { 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; } diff --git a/include/boost/fusion/container/list/list.hpp b/include/boost/fusion/container/list/list.hpp index 45e2f637..1d902059 100644 --- a/include/boost/fusion/container/list/list.hpp +++ b/include/boost/fusion/container/list/list.hpp @@ -32,7 +32,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; struct void_; template diff --git a/include/boost/fusion/container/map.hpp b/include/boost/fusion/container/map.hpp index b9e8cd2c..8e7cd68d 100644 --- a/include/boost/fusion/container/map.hpp +++ b/include/boost/fusion/container/map.hpp @@ -7,7 +7,6 @@ #if !defined(FUSION_SEQUENCE_CLASS_MAP_10022005_0606) #define FUSION_SEQUENCE_CLASS_MAP_10022005_0606 -#include #include #include #include diff --git a/include/boost/fusion/container/map/convert.hpp b/include/boost/fusion/container/map/convert.hpp index bc3fa053..9488af2d 100644 --- a/include/boost/fusion/container/map/convert.hpp +++ b/include/boost/fusion/container/map/convert.hpp @@ -4,26 +4,34 @@ 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 +#if !defined(FUSION_CONVERT_MAIN_09232005_1340) +#define FUSION_CONVERT_MAIN_09232005_1340 -#include -#include #include -#include -#include + +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) +# include + +#else +/////////////////////////////////////////////////////////////////////////////// +// C++11 variadic implementation +/////////////////////////////////////////////////////////////////////////////// +#include namespace boost { namespace fusion { namespace result_of { template - struct as_map + struct as_map : + detail::build_map< + typename result_of::begin::type + , typename result_of::end::type + > { - typedef typename detail::as_map::value> gen; - typedef typename gen:: - template apply::type>::type - type; }; } @@ -31,16 +39,16 @@ namespace boost { namespace fusion inline typename result_of::as_map::type as_map(Sequence& seq) { - typedef typename result_of::as_map::gen gen; - return gen::call(fusion::begin(seq)); + typedef result_of::as_map gen; + return gen::call(fusion::begin(seq), fusion::end(seq)); } template inline typename result_of::as_map::type as_map(Sequence const& seq) { - typedef typename result_of::as_map::gen gen; - return gen::call(fusion::begin(seq)); + typedef result_of::as_map gen; + return gen::call(fusion::begin(seq), fusion::end(seq)); } namespace extension @@ -69,3 +77,5 @@ namespace boost { namespace fusion }} #endif +#endif + diff --git a/include/boost/fusion/container/map/detail/at_impl.hpp b/include/boost/fusion/container/map/detail/at_impl.hpp index 025c1724..3a16100b 100644 --- a/include/boost/fusion/container/map/detail/at_impl.hpp +++ b/include/boost/fusion/container/map/detail/at_impl.hpp @@ -1,17 +1,13 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2011 Brandon Kohn + 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) ==============================================================================*/ -#if !defined(BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP) -#define BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP +#if !defined(BOOST_FUSION_MAP_DETAIL_AT_IMPL_02042013_0821) +#define BOOST_FUSION_MAP_DETAIL_AT_IMPL_02042013_0821 #include -#include -#include -#include namespace boost { namespace fusion { @@ -26,36 +22,36 @@ namespace boost { namespace fusion struct at_impl { template - struct apply + struct apply { - typedef typename - mpl::at::type - element; - typedef typename detail::ref_result::type type; - + typedef mpl::int_ index; + typedef + decltype(std::declval().get(index())) + type; + static type call(Sequence& m) { - return m.get_data().at_impl(N()); + return m.get(index()); } }; template struct apply { - typedef typename - mpl::at::type - element; - typedef typename detail::cref_result::type type; - + typedef mpl::int_ index; + typedef + decltype(std::declval().get(index())) + type; + static type call(Sequence const& m) { - return m.get_data().at_impl(N()); + return m.get(index()); } }; }; } }} -#endif //BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP +#endif diff --git a/include/boost/fusion/container/map/detail/at_key_impl.hpp b/include/boost/fusion/container/map/detail/at_key_impl.hpp new file mode 100644 index 00000000..1f08a47b --- /dev/null +++ b/include/boost/fusion/container/map/detail/at_key_impl.hpp @@ -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 +#include +#include +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct at_key_impl; + + template <> + struct at_key_impl + { + template + struct apply + { + typedef + decltype(std::declval().get(mpl::identity())) + type; + + static type + call(Sequence& m) + { + return m.get(mpl::identity()); + } + }; + + template + struct apply + { + typedef + decltype(std::declval().get(mpl::identity())) + type; + + static type + call(Sequence const& m) + { + return m.get(mpl::identity()); + } + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/map/detail/begin_impl.hpp b/include/boost/fusion/container/map/detail/begin_impl.hpp index 2d0f854b..047683b8 100644 --- a/include/boost/fusion/container/map/detail/begin_impl.hpp +++ b/include/boost/fusion/container/map/detail/begin_impl.hpp @@ -1,43 +1,38 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2009 Christopher Schmidt + 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_MAP_BEGIN_IMPL_02042013_0857) +#define BOOST_FUSION_MAP_BEGIN_IMPL_02042013_0857 -#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP -#define BOOST_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP +#include -#include - -namespace boost { namespace fusion { namespace extension +namespace boost { namespace fusion { - template - struct begin_impl; + struct map_tag; - template <> - struct begin_impl + namespace extension { - template - struct apply - { - typedef - basic_iterator< - map_iterator_tag - , typename Seq::category - , Seq - , 0 - > - type; + template + struct begin_impl; - static type - call(Seq& seq) + template<> + struct begin_impl + { + template + struct apply { - return type(seq,0); - } + typedef map_iterator type; + + static type call(Sequence& seq) + { + return type(seq); + } + }; }; - }; -}}} + } +}} #endif diff --git a/include/boost/fusion/container/map/detail/build_map.hpp b/include/boost/fusion/container/map/detail/build_map.hpp new file mode 100644 index 00000000..8170b276 --- /dev/null +++ b/include/boost/fusion/container/map/detail/build_map.hpp @@ -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 +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace fusion { namespace detail +{ + template ::value> + struct build_map; + + template + struct build_map + { + typedef map<> type; + static type + call(First const&, Last const&) + { + return type(); + } + }; + + template + struct push_front_map; + + template + struct push_front_map> + { + typedef map type; + + static type + call(T const& first, map const& rest) + { + return type(push_front(rest, first)); + } + }; + + template + struct build_map + { + typedef + build_map::type, Last> + next_build_map; + + typedef push_front_map< + typename result_of::value_of::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::type v = *f; + return push_front::call( + v, next_build_map::call(fusion::next(f), l)); + } + }; +}}} + +#endif diff --git a/include/boost/fusion/container/map/detail/as_map.hpp b/include/boost/fusion/container/map/detail/cpp03/as_map.hpp similarity index 95% rename from include/boost/fusion/container/map/detail/as_map.hpp rename to include/boost/fusion/container/map/detail/cpp03/as_map.hpp index b1a4d09f..3654a4de 100644 --- a/include/boost/fusion/container/map/detail/as_map.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/as_map.hpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ namespace boost { namespace fusion { namespace detail }}} #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +#include #else #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") @@ -77,7 +77,7 @@ namespace boost { namespace fusion { namespace detail typedef typename fusion::result_of::value_of::type \ BOOST_PP_CAT(T, n); -#define BOOST_PP_FILENAME_1 +#define BOOST_PP_FILENAME_1 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/map/detail/cpp03/at_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/at_impl.hpp new file mode 100644 index 00000000..025c1724 --- /dev/null +++ b/include/boost/fusion/container/map/detail/cpp03/at_impl.hpp @@ -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 +#include +#include +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct at_impl; + + template <> + struct at_impl + { + template + struct apply + { + typedef typename + mpl::at::type + element; + typedef typename detail::ref_result::type type; + + static type + call(Sequence& m) + { + return m.get_data().at_impl(N()); + } + }; + + template + struct apply + { + typedef typename + mpl::at::type + element; + typedef typename detail::cref_result::type type; + + static type + call(Sequence const& m) + { + return m.get_data().at_impl(N()); + } + }; + }; + } +}} + +#endif //BOOST_FUSION_MAP_DETAIL_AT_IMPL_HPP diff --git a/include/boost/fusion/container/map/detail/cpp03/begin_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/begin_impl.hpp new file mode 100644 index 00000000..2d0f854b --- /dev/null +++ b/include/boost/fusion/container/map/detail/cpp03/begin_impl.hpp @@ -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 + +namespace boost { namespace fusion { namespace extension +{ + template + struct begin_impl; + + template <> + struct begin_impl + { + template + struct apply + { + typedef + basic_iterator< + map_iterator_tag + , typename Seq::category + , Seq + , 0 + > + type; + + static type + call(Seq& seq) + { + return type(seq,0); + } + }; + }; +}}} + +#endif diff --git a/include/boost/fusion/container/map/detail/cpp03/convert.hpp b/include/boost/fusion/container/map/detail/cpp03/convert.hpp new file mode 100644 index 00000000..b35d0d06 --- /dev/null +++ b/include/boost/fusion/container/map/detail/cpp03/convert.hpp @@ -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 +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + namespace result_of + { + template + struct as_map + { + typedef typename detail::as_map::value> gen; + typedef typename gen:: + template apply::type>::type + type; + }; + } + + template + inline typename result_of::as_map::type + as_map(Sequence& seq) + { + typedef typename result_of::as_map::gen gen; + return gen::call(fusion::begin(seq)); + } + + template + inline typename result_of::as_map::type + as_map(Sequence const& seq) + { + typedef typename result_of::as_map::gen gen; + return gen::call(fusion::begin(seq)); + } +}} + +#endif diff --git a/include/boost/fusion/container/map/detail/convert_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/convert_impl.hpp similarity index 91% rename from include/boost/fusion/container/map/detail/convert_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/convert_impl.hpp index c4b9389d..1634a44b 100644 --- a/include/boost/fusion/container/map/detail/convert_impl.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/convert_impl.hpp @@ -8,8 +8,8 @@ #if !defined(FUSION_CONVERT_IMPL_09232005_1340) #define FUSION_CONVERT_IMPL_09232005_1340 -#include -#include +#include +#include #include #include diff --git a/include/boost/fusion/container/map/detail/deref_data_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/deref_data_impl.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/deref_data_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/deref_data_impl.hpp diff --git a/include/boost/fusion/container/map/detail/deref_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/deref_impl.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/deref_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/deref_impl.hpp diff --git a/include/boost/fusion/container/map/detail/cpp03/end_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/end_impl.hpp new file mode 100644 index 00000000..1375b7af --- /dev/null +++ b/include/boost/fusion/container/map/detail/cpp03/end_impl.hpp @@ -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 + +namespace boost { namespace fusion { namespace extension +{ + template + struct end_impl; + + template <> + struct end_impl + { + template + 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 diff --git a/include/boost/fusion/container/map/detail/key_of_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/key_of_impl.hpp similarity index 92% rename from include/boost/fusion/container/map/detail/key_of_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/key_of_impl.hpp index 5a90c037..ce40c3f7 100644 --- a/include/boost/fusion/container/map/detail/key_of_impl.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/key_of_impl.hpp @@ -8,7 +8,7 @@ #ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP #define BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP -#include +#include namespace boost { namespace fusion { namespace extension { diff --git a/include/boost/fusion/container/map/limits.hpp b/include/boost/fusion/container/map/detail/cpp03/limits.hpp similarity index 100% rename from include/boost/fusion/container/map/limits.hpp rename to include/boost/fusion/container/map/detail/cpp03/limits.hpp diff --git a/include/boost/fusion/container/map/detail/cpp03/map.hpp b/include/boost/fusion/container/map/detail/cpp03/map.hpp new file mode 100644 index 00000000..74e4f599 --- /dev/null +++ b/include/boost/fusion/container/map/detail/cpp03/map.hpp @@ -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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#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 + struct map : sequence_base > + { + 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 + map(Sequence const& rhs) + : data(rhs) {} + + #include + + template + 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 diff --git a/include/boost/fusion/container/map/detail/map_forward_ctor.hpp b/include/boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp similarity index 94% rename from include/boost/fusion/container/map/detail/map_forward_ctor.hpp rename to include/boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp index c0f983c4..50e78040 100644 --- a/include/boost/fusion/container/map/detail/map_forward_ctor.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp @@ -13,7 +13,7 @@ #include #define BOOST_PP_FILENAME_1 \ - + #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) #include BOOST_PP_ITERATE() diff --git a/include/boost/fusion/container/map/detail/cpp03/map_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/map_fwd.hpp new file mode 100644 index 00000000..b04ff322 --- /dev/null +++ b/include/boost/fusion/container/map/detail/cpp03/map_fwd.hpp @@ -0,0 +1,52 @@ +/*============================================================================= + Copyright (c) 2001-2011 Joel de Guzman + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(FUSION_MAP_FORWARD_07212005_1105) +#define FUSION_MAP_FORWARD_07212005_1105 + +#include +#include + +#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) +#include +#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 "_fwd.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 map_tag; + struct map_iterator_tag; + + template < + BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( + FUSION_MAX_MAP_SIZE, typename T, void_) + > + struct map; +}} + +#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) +#pragma wave option(output: null) +#endif + +#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES + +#endif diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map.hpp similarity index 62% rename from include/boost/fusion/container/map/detail/preprocessed/as_map.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map.hpp index 47eb0e4c..1d1be080 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/as_map.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_MAP_SIZE <= 10 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 20 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 30 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 40 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_MAP_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map10.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map10.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/as_map10.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map10.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map20.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map20.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/as_map20.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map20.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map30.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map30.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/as_map30.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map30.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map40.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map40.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/as_map40.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map40.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/as_map50.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map50.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/as_map50.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/as_map50.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map.hpp similarity index 63% rename from include/boost/fusion/container/map/detail/preprocessed/map.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map.hpp index 93455c71..c6cd526a 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/map.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_MAP_SIZE <= 10 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 20 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 30 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 40 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_MAP_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/map/detail/preprocessed/map10.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map10.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map10.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map10.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map10_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map10_fwd.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map10_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map10_fwd.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map20.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map20.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map20.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map20.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map20_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map20_fwd.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map20_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map20_fwd.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map30.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map30.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map30.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map30.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map30_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map30_fwd.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map30_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map30_fwd.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map40.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map40.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map40.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map40.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map40_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map40_fwd.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map40_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map40_fwd.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map50.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map50.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map50.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map50.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map50_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map50_fwd.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/preprocessed/map50_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map50_fwd.hpp diff --git a/include/boost/fusion/container/map/detail/preprocessed/map_fwd.hpp b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map_fwd.hpp similarity index 62% rename from include/boost/fusion/container/map/detail/preprocessed/map_fwd.hpp rename to include/boost/fusion/container/map/detail/cpp03/preprocessed/map_fwd.hpp index e478a6f8..2e66a457 100644 --- a/include/boost/fusion/container/map/detail/preprocessed/map_fwd.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/preprocessed/map_fwd.hpp @@ -8,15 +8,15 @@ ==============================================================================*/ #if FUSION_MAX_MAP_SIZE <= 10 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 20 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 30 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 40 -#include +#include #elif FUSION_MAX_MAP_SIZE <= 50 -#include +#include #else #error "FUSION_MAX_MAP_SIZE out of bounds for preprocessed headers" #endif diff --git a/include/boost/fusion/container/map/detail/cpp03/value_at_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/value_at_impl.hpp new file mode 100644 index 00000000..31d9b383 --- /dev/null +++ b/include/boost/fusion/container/map/detail/cpp03/value_at_impl.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + 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_VALUE_AT_IMPL_HPP) +#define BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP + +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct value_at_impl; + + template <> + struct value_at_impl + { + template + struct apply + { + typedef typename mpl::at::type type; + }; + }; + } +}} + +#endif //BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP diff --git a/include/boost/fusion/container/map/detail/value_of_data_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/value_of_data_impl.hpp similarity index 93% rename from include/boost/fusion/container/map/detail/value_of_data_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/value_of_data_impl.hpp index 28d21678..842791cc 100644 --- a/include/boost/fusion/container/map/detail/value_of_data_impl.hpp +++ b/include/boost/fusion/container/map/detail/cpp03/value_of_data_impl.hpp @@ -8,7 +8,7 @@ #ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_DATA_IMPL_HPP #define BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_DATA_IMPL_HPP -#include +#include namespace boost { namespace fusion { namespace extension { diff --git a/include/boost/fusion/container/map/detail/value_of_impl.hpp b/include/boost/fusion/container/map/detail/cpp03/value_of_impl.hpp similarity index 100% rename from include/boost/fusion/container/map/detail/value_of_impl.hpp rename to include/boost/fusion/container/map/detail/cpp03/value_of_impl.hpp diff --git a/include/boost/fusion/container/map/detail/end_impl.hpp b/include/boost/fusion/container/map/detail/end_impl.hpp index 1375b7af..03c1fdd9 100644 --- a/include/boost/fusion/container/map/detail/end_impl.hpp +++ b/include/boost/fusion/container/map/detail/end_impl.hpp @@ -1,43 +1,38 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2009 Christopher Schmidt + 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_MAP_END_IMPL_02042013_0857) +#define BOOST_FUSION_MAP_END_IMPL_02042013_0857 -#ifndef BOOST_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP -#define BOOST_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP +#include -#include - -namespace boost { namespace fusion { namespace extension +namespace boost { namespace fusion { - template - struct end_impl; + struct map_tag; - template <> - struct end_impl + namespace extension { - template - struct apply - { - typedef - basic_iterator< - map_iterator_tag - , typename Seq::category - , Seq - , Seq::size::value - > - type; + template + struct end_impl; - static type - call(Seq& seq) + template<> + struct end_impl + { + template + struct apply { - return type(seq,0); - } + typedef map_iterator type; + + static type call(Sequence& seq) + { + return type(seq); + } + }; }; - }; -}}} + } +}} #endif diff --git a/include/boost/fusion/container/map/detail/map_impl.hpp b/include/boost/fusion/container/map/detail/map_impl.hpp new file mode 100644 index 00000000..cea25496 --- /dev/null +++ b/include/boost/fusion/container/map/detail/map_impl.hpp @@ -0,0 +1,176 @@ +/*============================================================================= + 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_MAP_IMPL_02032013_2233) +#define BOOST_FUSION_MAP_IMPL_02032013_2233 + +#include +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct fusion_sequence_tag; +}} + +namespace boost { namespace fusion { namespace detail +{ + struct map_impl_from_iterator {}; + + template + struct map_impl; + + template + struct map_impl + { + typedef fusion_sequence_tag tag; + static int const index = index_; + static int const size = 0; + + map_impl() {} + + template + map_impl(Iterator const& iter, map_impl_from_iterator) + {} + + template + void assign(Iterator const& iter, map_impl_from_iterator) + {} + + void get(); + void get_val(); + void get_key(); + }; + + template + struct map_impl : map_impl + { + typedef fusion_sequence_tag tag; + typedef map_impl rest_type; + + using rest_type::get; + using rest_type::get_val; + using rest_type::get_key; + + static int const index = index_; + static int const size = rest_type::size + 1; + + typedef Pair pair_type; + typedef typename Pair::first_type key_type; + typedef typename Pair::second_type value_type; + + map_impl() + : rest_type(), element() + {} + + map_impl(map_impl const& rhs) + : rest_type(rhs.get_base()), element(rhs.element) + {} + + map_impl(map_impl&& rhs) + : rest_type(std::forward(*static_cast(this))) + , element(std::forward(rhs.element)) + {} + + template + map_impl(map_impl const& rhs) + : rest_type(rhs.get_base()), element(rhs.element) + {} + + map_impl(typename detail::call_param::type element + , typename detail::call_param::type... rest) + : rest_type(rest...), element(element) + {} + + map_impl(Pair&& element, T&&... rest) + : rest_type(std::forward(rest)...) + , element(std::forward(element)) + {} + + template + map_impl(Iterator const& iter, map_impl_from_iterator fi) + : rest_type(fusion::next(iter), fi) + , element(*iter) + {} + + rest_type& get_base() + { + return *this; + } + + rest_type const& get_base() const + { + return *this; + } + + value_type get_val(mpl::identity); + pair_type get_val(mpl::int_); + value_type get_val(mpl::identity) const; + pair_type get_val(mpl::int_) const; + + key_type get_key(mpl::int_); + key_type get_key(mpl::int_) const; + + typename cref_result::type + get(mpl::identity) const + { + return element.second; + } + + typename ref_result::type + get(mpl::identity) + { + return element.second; + } + + typename cref_result::type + get(mpl::int_) const + { + return element; + } + + typename ref_result::type + get(mpl::int_) + { + return element; + } + + template + map_impl& operator=(map_impl const& rhs) + { + rest_type::operator=(rhs); + element = rhs.element; + return *this; + } + + map_impl& operator=(map_impl const& rhs) + { + rest_type::operator=(rhs); + element = rhs.element; + return *this; + } + + map_impl& operator=(map_impl&& rhs) + { + rest_type::operator=(std::forward(rhs)); + element = std::forward(rhs.element); + return *this; + } + + template + void assign(Iterator const& iter, map_impl_from_iterator fi) + { + rest_type::assign(fusion::next(iter), fi); + element = *iter; + } + + Pair element; + }; +}}} + +#endif diff --git a/include/boost/fusion/container/map/detail/map_index.hpp b/include/boost/fusion/container/map/detail/map_index.hpp new file mode 100644 index 00000000..9326cded --- /dev/null +++ b/include/boost/fusion/container/map/detail/map_index.hpp @@ -0,0 +1,19 @@ +/*============================================================================= + 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_MAP_INDEX_02032013_2233) +#define BOOST_FUSION_MAP_INDEX_02032013_2233 + +namespace boost { namespace fusion { namespace detail +{ + template + struct map_index + { + static int const value = N; + }; +}}} + +#endif diff --git a/include/boost/fusion/container/map/detail/value_at_impl.hpp b/include/boost/fusion/container/map/detail/value_at_impl.hpp index 31d9b383..75f2ddae 100644 --- a/include/boost/fusion/container/map/detail/value_at_impl.hpp +++ b/include/boost/fusion/container/map/detail/value_at_impl.hpp @@ -1,12 +1,11 @@ /*============================================================================= - Copyright (c) 2001-2011 Joel de Guzman - Copyright (c) 2011 Brandon Kohn + 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) ==============================================================================*/ -#if !defined(BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP) -#define BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP +#if !defined(BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_02042013_0821) +#define BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_02042013_0821 #include @@ -23,12 +22,16 @@ namespace boost { namespace fusion struct value_at_impl { template - struct apply + struct apply { - typedef typename mpl::at::type type; + typedef mpl::int_ index; + typedef + decltype(std::declval().get_val(index())) + type; }; }; } }} -#endif //BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_HPP +#endif + diff --git a/include/boost/fusion/container/map/detail/value_at_key_impl.hpp b/include/boost/fusion/container/map/detail/value_at_key_impl.hpp new file mode 100644 index 00000000..708e9913 --- /dev/null +++ b/include/boost/fusion/container/map/detail/value_at_key_impl.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + 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_VALUE_AT_KEY_IMPL_02042013_0821) +#define BOOST_FUSION_MAP_DETAIL_VALUE_AT_KEY_IMPL_02042013_0821 + +#include +#include +#include +#include + +namespace boost { namespace fusion +{ + struct map_tag; + + namespace extension + { + template + struct value_at_key_impl; + + template <> + struct value_at_key_impl + { + template + struct apply + { + typedef + decltype(std::declval().get_val(mpl::identity())) + type; + }; + }; + } +}} + +#endif diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index 5152e6e1..95b051ca 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -4,96 +4,115 @@ 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 +#if !defined(FUSION_MAP_MAIN_07212005_1106) +#define FUSION_MAP_MAIN_07212005_1106 -#include -#include -#include #include -#include -#include +#include + +/////////////////////////////////////////////////////////////////////////////// +// Without variadics, we will use the PP version +/////////////////////////////////////////////////////////////////////////////// +#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) +# include +#else + +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include -#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 +#include namespace boost { namespace fusion { - struct void_; - struct fusion_sequence_tag; + struct map_tag; - template - struct map : sequence_base > + template + struct map : detail::map_impl<0, T...>, sequence_base> { - 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 detail::map_impl<0, T...> base_type; + + struct category : random_access_traversal_tag, associative_tag {}; + typedef mpl::int_ size; typedef mpl::false_ is_view; - typedef vector< - BOOST_PP_ENUM_PARAMS(FUSION_MAX_MAP_SIZE, T)> - storage_type; + map() {} - typedef typename storage_type::size size; + map(map const& seq) + : base_type(seq.base()) + {} - map() - : data() {} + map(map&& seq) + : base_type(std::forward(seq)) + {} template - map(Sequence const& rhs) - : data(rhs) {} + map(Sequence const& seq + , typename enable_if>::type* /*dummy*/ = 0) + : base_type(begin(seq), detail::map_impl_from_iterator()) + {} - #include + template + map(Sequence& seq + , typename enable_if>::type* /*dummy*/ = 0) + : base_type(begin(seq), detail::map_impl_from_iterator()) + {} - template - map& - operator=(T const& rhs) + template + map(Sequence&& seq + , typename enable_if>::type* /*dummy*/ = 0) + : base_type(begin(seq), detail::map_impl_from_iterator()) + {} + + template + map(First const& first, T_ const&... rest) + : base_type(first, rest...) + {} + + template + map(First&& first, T_&&... rest) + : base_type(std::forward(first), std::forward(rest)...) + {} + + map& operator=(map const& rhs) { - data = rhs; + base_type::operator=(rhs.base()); return *this; } - storage_type& get_data() { return data; } - storage_type const& get_data() const { return data; } + map& operator=(map&& rhs) + { + base_type::operator=(std::forward(rhs.base())); + return *this; + } - private: + template + typename enable_if, map&>::type + operator=(Sequence const& seq) + { + base().assign(begin(seq), detail::map_impl_from_iterator()); + return *this; + } - storage_type data; + base_type& base() { return *this; } + base_type const& base() const { return *this; } }; }} -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) #endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - #endif diff --git a/include/boost/fusion/container/map/map_fwd.hpp b/include/boost/fusion/container/map/map_fwd.hpp index 76c5eea7..00d0bf47 100644 --- a/include/boost/fusion/container/map/map_fwd.hpp +++ b/include/boost/fusion/container/map/map_fwd.hpp @@ -4,49 +4,33 @@ 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_FORWARD_07212005_1105) -#define FUSION_MAP_FORWARD_07212005_1105 +#if !defined(FUSION_MAP_FORWARD_MAIN_07212005_1105) +#define FUSION_MAP_FORWARD_MAIN_07212005_1105 -#include -#include +#include -#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) -#include +/////////////////////////////////////////////////////////////////////////////// +// With no decltype and variadics, we will use the C++03 version +/////////////////////////////////////////////////////////////////////////////// +#if (defined(BOOST_NO_CXX11_DECLTYPE) \ + || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \ + || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)) +# include #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 "_fwd.hpp") +# if !defined(BOOST_FUSION_HAS_VARIADIC_MAP) +# define BOOST_FUSION_HAS_VARIADIC_MAP #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 +#include +/////////////////////////////////////////////////////////////////////////////// +// C++11 interface +/////////////////////////////////////////////////////////////////////////////// namespace boost { namespace fusion { - struct void_; - struct map_tag; - struct map_iterator_tag; - - template < - BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( - FUSION_MAX_MAP_SIZE, typename T, void_) - > + template struct map; }} -#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) -#pragma wave option(output: null) #endif - -#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES - #endif diff --git a/include/boost/fusion/container/map/map_iterator.hpp b/include/boost/fusion/container/map/map_iterator.hpp new file mode 100644 index 00000000..a4ad80f0 --- /dev/null +++ b/include/boost/fusion/container/map/map_iterator.hpp @@ -0,0 +1,148 @@ +/*============================================================================= + Copyright (c) 2005-2013 Joel de Guzman + Copyright (c) 2005-2006 Dan Marsden + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#if !defined(BOOST_FUSION_MAP_ITERATOR_02042013_0835) +#define BOOST_FUSION_MAP_ITERATOR_02042013_0835 + +#include +#include +#include + +namespace boost { namespace fusion +{ + struct random_access_traversal_tag; + + template + struct map_iterator + : iterator_facade< + map_iterator + , typename Seq::category> + { + typedef Seq sequence; + typedef mpl::int_ index; + + map_iterator(Seq& seq) + : seq_(seq) + {} + + template + struct value_of + { + typedef typename Iterator::sequence sequence; + typedef typename Iterator::index index; + typedef + decltype(std::declval().get_val(index())) + type; + }; + + template + struct value_of_data + { + typedef typename Iterator::sequence sequence; + typedef typename Iterator::index index; + typedef + decltype(std::declval().get_val(index()).second) + type; + }; + + template + struct key_of + { + typedef typename Iterator::sequence sequence; + typedef typename Iterator::index index; + typedef + decltype(std::declval().get_key(index())) + type; + }; + + template + struct deref + { + typedef typename Iterator::sequence sequence; + typedef typename Iterator::index index; + typedef + decltype(std::declval().get(index())) + type; + + static type + call(Iterator const& it) + { + return it.seq_.get(typename Iterator::index()); + } + }; + + template + struct deref_data + { + typedef typename Iterator::sequence sequence; + typedef typename Iterator::index index; + typedef + decltype(std::declval().get(index()).second) + type; + + static type + call(Iterator const& it) + { + return it.seq_.get(typename Iterator::index()).second; + } + }; + + template + struct advance + { + typedef typename Iterator::index index; + typedef typename Iterator::sequence sequence; + typedef map_iterator type; + + static type + call(Iterator const& i) + { + return type(i.seq_); + } + }; + + template + struct next + : advance > + {}; + + template + struct prior + : advance > + {}; + + template + struct distance + { + typedef typename + mpl::minus< + typename I2::index, typename I1::index + >::type + type; + + static type + call(I1 const&, I2 const&) + { + return type(); + } + }; + + template + struct equal_to + : mpl::equal_to + {}; + + Seq& seq_; + + private: + // silence MSVC warning C4512: assignment operator could not be generated + map_iterator& operator= (map_iterator const&); + }; + +}} + +#endif diff --git a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp b/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp index c41d5b29..2607321f 100644 --- a/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp +++ b/include/boost/fusion/container/vector/detail/vector_forward_ctor.hpp @@ -12,14 +12,14 @@ #include #include -#define FUSION_FORWARD_CTOR_MOVE(z, n, _) std::move(_##n) +#define FUSION_FORWARD_CTOR_FORWARD(z, n, _) std::forward(_##n) #define BOOST_PP_FILENAME_1 \ #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) #include BOOST_PP_ITERATE() -#undef FUSION_FORWARD_CTOR_MOVE +#undef FUSION_FORWARD_CTOR_FORWARD #endif #else // defined(BOOST_PP_IS_ITERATING) /////////////////////////////////////////////////////////////////////////////// @@ -37,12 +37,13 @@ N, typename detail::call_param::type _)) : vec(BOOST_PP_ENUM_PARAMS(N, _)) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template #if N == 1 explicit #endif - vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) - : vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_MOVE, _)) {} + vector(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _)) + : vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_FORWARD, _)) {} #endif #undef N diff --git a/include/boost/fusion/container/vector/detail/vector_n.hpp b/include/boost/fusion/container/vector/detail/vector_n.hpp index 539b47fa..1354ff41 100644 --- a/include/boost/fusion/container/vector/detail/vector_n.hpp +++ b/include/boost/fusion/container/vector/detail/vector_n.hpp @@ -9,21 +9,34 @@ #if !defined(FUSION_MACRO_05042005) #define FUSION_MACRO_05042005 -#define FUSION_VECTOR_MEMBER_MEMBER_DEFAULT_INIT(z, n, _) m##n() -#define FUSION_VECTOR_MEMBER_MEMBER_INIT(z, n, _) m##n(_##n) -#define FUSION_VECTOR_MEMBER_COPY_INIT(z, n, _) m##n(other.m##n) -#define FUSION_VECTOR_MEMBER_FWD(z, n, _) m##n(std::forward(other.m##n)) -#define FUSION_VECTOR_ARG_FWD(z, n, _) m##n(std::forward(_##n)) -#define FUSION_VECTOR_MEMBER_MEMBER_DECL(z, n, _) T##n m##n; -#define FUSION_VECTOR_MEMBER_FORWARD(z, n, _) std::forward(_##n) +#define FUSION_VECTOR_CTOR_DEFAULT_INIT(z, n, _) \ + m##n() -#define FUSION_VECTOR_MEMBER_MEMBER_ASSIGN(z, n, _) \ +#define FUSION_VECTOR_CTOR_INIT(z, n, _) \ + m##n(_##n) + +#define FUSION_VECTOR_MEMBER_CTOR_INIT(z, n, _) \ + m##n(other.m##n) + +#define FUSION_VECTOR_CTOR_FORWARD(z, n, _) \ + m##n(std::forward(other.m##n)) + +#define FUSION_VECTOR_CTOR_ARG_FWD(z, n, _) \ + m##n(std::forward(_##n)) + +#define FUSION_VECTOR_MEMBER_DECL(z, n, _) \ + T##n m##n; + +#define FUSION_VECTOR_MEMBER_FORWARD(z, n, _) \ + std::forward(_##n) + +#define FUSION_VECTOR_MEMBER_ASSIGN(z, n, _) \ this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n); -#define FUSION_VECTOR_MEMBER_DEREF_MEMBER_ASSIGN(z, n, _) \ +#define FUSION_VECTOR_MEMBER_DEREF_ASSIGN(z, n, _) \ this->BOOST_PP_CAT(m, n) = *BOOST_PP_CAT(i, n); -#define FUSION_VECTOR_MEMBER_MEMBER_FORWARD(z, n, _) \ +#define FUSION_VECTOR_MEMBER_MOVE(z, n, _) \ this->BOOST_PP_CAT(m, n) = std::forward< \ BOOST_PP_CAT(T, n)>(vec.BOOST_PP_CAT(m, n)); @@ -47,32 +60,35 @@ struct BOOST_PP_CAT(vector_data, N) { BOOST_PP_CAT(vector_data, N)() - : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_MEMBER_DEFAULT_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_CTOR_DEFAULT_INIT, _) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) - BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) - : BOOST_PP_ENUM(N, FUSION_VECTOR_ARG_FWD, _) {} +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template + BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _) + , typename boost::enable_if >::type* /*dummy*/ = 0 + ) + : BOOST_PP_ENUM(N, FUSION_VECTOR_CTOR_ARG_FWD, _) {} #endif BOOST_PP_CAT(vector_data, N)( BOOST_PP_ENUM_BINARY_PARAMS( N, typename detail::call_param::type _)) - : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_MEMBER_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_CTOR_INIT, _) {} BOOST_PP_CAT(vector_data, N)( BOOST_PP_CAT(vector_data, N) const& other) - : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_COPY_INIT, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_CTOR_INIT, _) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) BOOST_PP_CAT(vector_data, N)( BOOST_PP_CAT(vector_data, N)&& other) - : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_FWD, _) {} + : BOOST_PP_ENUM(N, FUSION_VECTOR_CTOR_FORWARD, _) {} #endif BOOST_PP_CAT(vector_data, N)& operator=(BOOST_PP_CAT(vector_data, N) const& vec) { - BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_ASSIGN, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_ASSIGN, _) return *this; } @@ -96,7 +112,7 @@ return BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_PARAMS(N, *i)); } - BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_DECL, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_DECL, _) }; template @@ -123,17 +139,25 @@ N, typename detail::call_param::type _)) : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + template #if (N == 1) explicit -#endif - BOOST_PP_CAT(vector, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _)) + BOOST_PP_CAT(vector, N)(U0&& _0 + , typename boost::enable_if >::type* /*dummy*/ = 0 + ) + : base_type(std::forward(_0)) {} +#else + BOOST_PP_CAT(vector, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _)) : base_type(BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_FORWARD, _)) {} #endif -#if !defined(BOOST_NO_RVALUE_REFERENCES) BOOST_PP_CAT(vector, N)(BOOST_PP_CAT(vector, N)&& rhs) : base_type(std::forward(rhs)) {} + + BOOST_PP_CAT(vector, N)(BOOST_PP_CAT(vector, N) const& rhs) + : base_type(rhs) {} + #endif template @@ -163,7 +187,7 @@ BOOST_PP_CAT(vector, N)& operator=(BOOST_PP_CAT(vector, N) const& vec) { - BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_ASSIGN, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_ASSIGN, _) return *this; } @@ -174,15 +198,22 @@ typedef typename result_of::begin::type I0; I0 i0 = fusion::begin(seq); BOOST_PP_REPEAT_FROM_TO(1, N, FUSION_VECTOR_MEMBER_ITER_DECL_VAR, _) - BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_DEREF_MEMBER_ASSIGN, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_DEREF_ASSIGN, _) + return *this; + } + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + BOOST_PP_CAT(vector, N)& + operator=(BOOST_PP_CAT(vector, N) const& vec) + { + base_type::operator=(vec); return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) BOOST_PP_CAT(vector, N)& operator=(BOOST_PP_CAT(vector, N)&& vec) { - BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_FORWARD, _) + BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MOVE, _) return *this; } #endif diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index 36c1b7ac..94a9c71a 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -106,7 +106,7 @@ namespace boost { namespace fusion vector(vector const& rhs) : vec(rhs.vec) {} -#if !defined(BOOST_NO_RVALUE_REFERENCES) +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) vector(vector&& rhs) : vec(std::forward(rhs.vec)) {} #endif @@ -140,7 +140,14 @@ namespace boost { namespace fusion return *this; } -#if !defined(BOOST_NO_RVALUE_REFERENCES) + vector& + operator=(vector const& rhs) + { + vec = rhs.vec; + return *this; + } + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) vector& operator=(vector&& rhs) { diff --git a/include/boost/fusion/functional/adapter/unfused.hpp b/include/boost/fusion/functional/adapter/unfused.hpp index facd5c54..9101afee 100644 --- a/include/boost/fusion/functional/adapter/unfused.hpp +++ b/include/boost/fusion/functional/adapter/unfused.hpp @@ -100,7 +100,7 @@ namespace boost { namespace fusion namespace boost { -#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_DECLTYPE) +#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_CXX11_DECLTYPE) template struct result_of< boost::fusion::unfused const () > { diff --git a/include/boost/fusion/functional/adapter/unfused_typed.hpp b/include/boost/fusion/functional/adapter/unfused_typed.hpp index 923c6876..060c812e 100644 --- a/include/boost/fusion/functional/adapter/unfused_typed.hpp +++ b/include/boost/fusion/functional/adapter/unfused_typed.hpp @@ -80,7 +80,7 @@ namespace boost { namespace fusion namespace boost { -#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_DECLTYPE) +#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_CXX11_DECLTYPE) template struct result_of< boost::fusion::unfused_typed const () > : boost::fusion::unfused_typed::template result< diff --git a/include/boost/fusion/include/move.hpp b/include/boost/fusion/include/move.hpp new file mode 100644 index 00000000..32d0fe3b --- /dev/null +++ b/include/boost/fusion/include/move.hpp @@ -0,0 +1,12 @@ +/*============================================================================= + 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_INCLUDE_MOVE) +#define FUSION_INCLUDE_MOVE + +#include + +#endif diff --git a/include/boost/fusion/iterator/detail/segmented_equal_to.hpp b/include/boost/fusion/iterator/detail/segmented_equal_to.hpp index 1e4ad268..14982b86 100644 --- a/include/boost/fusion/iterator/detail/segmented_equal_to.hpp +++ b/include/boost/fusion/iterator/detail/segmented_equal_to.hpp @@ -13,7 +13,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; namespace detail { @@ -32,7 +32,7 @@ namespace boost { namespace fusion {}; template <> - struct segmented_equal_to + struct segmented_equal_to : mpl::true_ {}; } diff --git a/include/boost/fusion/iterator/detail/segmented_iterator.hpp b/include/boost/fusion/iterator/detail/segmented_iterator.hpp index ccd45fbf..a5cfb450 100644 --- a/include/boost/fusion/iterator/detail/segmented_iterator.hpp +++ b/include/boost/fusion/iterator/detail/segmented_iterator.hpp @@ -19,7 +19,7 @@ namespace boost { namespace fusion { - struct nil; + struct nil_; namespace detail { diff --git a/include/boost/fusion/iterator/detail/segmented_next_impl.hpp b/include/boost/fusion/iterator/detail/segmented_next_impl.hpp index 2a7f6f6c..0c5f9f51 100644 --- a/include/boost/fusion/iterator/detail/segmented_next_impl.hpp +++ b/include/boost/fusion/iterator/detail/segmented_next_impl.hpp @@ -83,7 +83,7 @@ namespace boost { namespace fusion //auto segmented_next_impl_recurse3(stack) //{ // if (size(stack) == 1) - // return cons(iterator_range(end(car(stack)), end(car(stack))), nil); + // return cons(iterator_range(end(car(stack)), end(car(stack))), nil_); // else // return segmented_next_impl_recurse(stack.cdr); //} diff --git a/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp b/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp index 968718eb..7f337ce1 100644 --- a/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp +++ b/include/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp @@ -19,10 +19,10 @@ namespace boost { namespace fusion { namespace detail { //auto segmented_begin( seq ) //{ - // return make_segmented_iterator( segmented_begin_impl( seq, nil ) ); + // return make_segmented_iterator( segmented_begin_impl( seq, nil_ ) ); //} - template + template struct segmented_begin { typedef diff --git a/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp b/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp index 469862ac..f62c97aa 100644 --- a/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp +++ b/include/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp @@ -18,7 +18,7 @@ namespace boost { namespace fusion { namespace detail // return make_segmented_iterator( segmented_end_impl( seq ) ); //} - template + template struct segmented_end { typedef diff --git a/include/boost/fusion/support/deduce_sequence.hpp b/include/boost/fusion/support/deduce_sequence.hpp index ce02a3cd..a1b690fc 100644 --- a/include/boost/fusion/support/deduce_sequence.hpp +++ b/include/boost/fusion/support/deduce_sequence.hpp @@ -32,7 +32,7 @@ namespace boost { namespace fusion { namespace traits { }; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result< deducer(T) >::type operator()(T&&) const; diff --git a/include/boost/fusion/support/pair.hpp b/include/boost/fusion/support/pair.hpp index 11ad1ffe..9c54e524 100644 --- a/include/boost/fusion/support/pair.hpp +++ b/include/boost/fusion/support/pair.hpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include #if defined (BOOST_MSVC) # pragma warning(push) @@ -28,9 +30,26 @@ namespace boost { namespace fusion pair() : second() {} + pair(pair const& rhs) + : second(rhs.second) {} + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + pair(pair&& rhs) + : second(std::forward(rhs.second)) {} +#endif + pair(typename detail::call_param::type val) : second(val) {} +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + + template + pair(Second2&& val + , typename boost::enable_if >::type* /*dummy*/ = 0 + ) : second(std::forward(val)) {} + +#endif + template pair(pair const& rhs) : second(rhs.second) {} @@ -42,6 +61,20 @@ namespace boost { namespace fusion return *this; } + pair& operator=(pair const& rhs) + { + second = rhs.second; + return *this; + } + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + pair& operator=(pair&& rhs) + { + second = std::forward(rhs.second); + return *this; + } +#endif + typedef First first_type; typedef Second second_type; Second second; @@ -105,6 +138,13 @@ namespace boost { namespace fusion { return l.second != r.second; } + + template + inline bool + operator<(pair const& l, pair const& r) + { + return l.second < r.second; + } }} #if defined (BOOST_MSVC) diff --git a/include/boost/fusion/support/segmented_fold_until.hpp b/include/boost/fusion/support/segmented_fold_until.hpp index 6ea58ac6..724e2a49 100644 --- a/include/boost/fusion/support/segmented_fold_until.hpp +++ b/include/boost/fusion/support/segmented_fold_until.hpp @@ -20,7 +20,7 @@ namespace boost { namespace fusion { //auto segmented_fold_until(seq, state, fun) //{ - // return first(segmented_fold_until_impl(seq, state, nil, fun)); + // return first(segmented_fold_until_impl(seq, state, nil_, fun)); //} namespace result_of @@ -32,7 +32,7 @@ namespace boost { namespace fusion detail::segmented_fold_until_impl< Sequence , State - , fusion::nil + , fusion::nil_ , Fun > filter; @@ -55,7 +55,7 @@ namespace boost { namespace fusion typename result_of::segmented_fold_until::filter filter; - return filter::call(seq, state, fusion::nil(), fun); + return filter::call(seq, state, fusion::nil_(), fun); } template @@ -66,7 +66,7 @@ namespace boost { namespace fusion typename result_of::segmented_fold_until::filter filter; - return filter::call(seq, state, fusion::nil(), fun); + return filter::call(seq, state, fusion::nil_(), fun); } }} diff --git a/include/boost/fusion/view/detail/strictest_traversal.hpp b/include/boost/fusion/view/detail/strictest_traversal.hpp index 7b7c9760..1561a5bd 100644 --- a/include/boost/fusion/view/detail/strictest_traversal.hpp +++ b/include/boost/fusion/view/detail/strictest_traversal.hpp @@ -56,7 +56,7 @@ namespace boost { namespace fusion }; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result::type operator()(StrictestSoFar&&, Next&&) const; diff --git a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp index 9bf459c4..2e4e0782 100644 --- a/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp +++ b/include/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp @@ -70,7 +70,7 @@ namespace boost { namespace fusion { namespace detail // switch (size(stack_begin)) // { // case 1: - // return nil; + // return nil_; // case 2: // // car(cdr(stack_begin)) is a range over values. // assert(end(front(car(stack_begin))) == end(car(cdr(stack_begin)))); @@ -205,7 +205,7 @@ namespace boost { namespace fusion { namespace detail template struct make_segment_sequence_front { - typedef typename Stack::cdr_type type; // nil + typedef typename Stack::cdr_type type; // nil_ static type call(Stack const &stack) { @@ -218,7 +218,7 @@ namespace boost { namespace fusion { namespace detail // switch (size(stack_end)) // { // case 1: - // return nil; + // return nil_; // case 2: // // car(cdr(stack_back)) is a range over values. // assert(end(front(car(stack_end))) == end(car(cdr(stack_end)))); @@ -348,7 +348,7 @@ namespace boost { namespace fusion { namespace detail template struct make_segment_sequence_back { - typedef typename Stack::cdr_type type; // nil + typedef typename Stack::cdr_type type; // nil_ static type call(Stack const& stack) { diff --git a/include/boost/fusion/view/nview/nview.hpp b/include/boost/fusion/view/nview/nview.hpp index 2355b688..401c4016 100644 --- a/include/boost/fusion/view/nview/nview.hpp +++ b/include/boost/fusion/view/nview/nview.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion template struct result : add_reference {}; -#ifdef BOOST_NO_RVALUE_REFERENCES +#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES template typename add_reference::type operator()(T& x) const diff --git a/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp b/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp index 13e0274f..513d781f 100644 --- a/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp +++ b/include/boost/fusion/view/zip_view/detail/value_at_impl.hpp @@ -38,7 +38,7 @@ namespace boost { namespace fusion { {}; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result::type operator()(Seq&&) const; diff --git a/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp b/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp index 5571155e..2890a4e3 100644 --- a/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp +++ b/include/boost/fusion/view/zip_view/detail/value_of_impl.hpp @@ -37,7 +37,7 @@ namespace boost { namespace fusion {}; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result::type operator()(It&&) const; diff --git a/include/boost/fusion/view/zip_view/zip_view.hpp b/include/boost/fusion/view/zip_view/zip_view.hpp index e9a0222d..b44739bb 100644 --- a/include/boost/fusion/view/zip_view/zip_view.hpp +++ b/include/boost/fusion/view/zip_view/zip_view.hpp @@ -68,7 +68,7 @@ namespace boost { namespace fusion { }; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result::type operator()(Seq&&) const; @@ -89,7 +89,7 @@ namespace boost { namespace fusion { }; // never called, but needed for decltype-based result_of (C++0x) -#ifndef BOOST_NO_RVALUE_REFERENCES +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename result::type operator()(Lhs&&, Rhs&&) const;