Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82634 - in trunk/boost/fusion/container: deque/detail generation/detail vector/detail
From: joel_at_[hidden]
Date: 2013-01-27 07:15:27


Author: djowel
Date: 2013-01-27 07:15:26 EST (Sun, 27 Jan 2013)
New Revision: 82634
URL: http://svn.boost.org/trac/boost/changeset/82634

Log:
MSVC (VC11) fixes for latest updates
Text files modified:
   trunk/boost/fusion/container/deque/detail/deque_forward_ctor.hpp | 15 +++++++++++----
   trunk/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp | 11 ++++++-----
   trunk/boost/fusion/container/deque/detail/pp_as_deque.hpp | 2 +-
   trunk/boost/fusion/container/deque/detail/pp_deque.hpp | 29 +++++++++++++++++++++++++++--
   trunk/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp | 2 +-
   trunk/boost/fusion/container/generation/detail/pp_deque_tie.hpp | 6 +++---
   trunk/boost/fusion/container/generation/detail/pp_make_deque.hpp | 9 ++++++---
   trunk/boost/fusion/container/vector/detail/vector_forward_ctor.hpp | 6 +++---
   8 files changed, 58 insertions(+), 22 deletions(-)

Modified: trunk/boost/fusion/container/deque/detail/deque_forward_ctor.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/deque_forward_ctor.hpp (original)
+++ trunk/boost/fusion/container/deque/detail/deque_forward_ctor.hpp 2013-01-27 07:15:26 EST (Sun, 27 Jan 2013)
@@ -13,7 +13,7 @@
 #error "C++03 only! This file should not have been included"
 #endif
 
-#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward<T##n>(t##n)
+#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward<T_##n>(t##n)
 
 #include <boost/preprocessor/iterate.hpp>
 #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
@@ -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<typename add_const<T, >::type>::type t))
     : base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::construct(BOOST_PP_ENUM_PARAMS(N, t)))
 {}
 
-#if !defined(BOOST_NO_CXX11_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<BOOST_PP_ENUM_PARAMS(N, T)>::construct(BOOST_PP_ENUM_PARAMS(N, t)))
+{}
+
+template <BOOST_PP_ENUM_PARAMS(N, typename T_)>
+deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t))
     : base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::
- forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _)))
+ forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _)))
 {}
 #endif
 

Modified: trunk/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp (original)
+++ trunk/boost/fusion/container/deque/detail/deque_keyed_values_call.hpp 2013-01-27 07:15:26 EST (Sun, 27 Jan 2013)
@@ -19,7 +19,7 @@
 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
 
 #define FUSION_DEQUE_KEYED_VALUES_FORWARD(z, n, _) \
- std::forward<BOOST_PP_CAT(T, n)>(BOOST_PP_CAT(t, n))
+ std::forward<BOOST_PP_CAT(T_, n)>(BOOST_PP_CAT(t, n))
 
 #define BOOST_PP_FILENAME_1 \
     <boost/fusion/container/deque/detail/deque_keyed_values_call.hpp>
@@ -40,16 +40,17 @@
         #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))
+ template <BOOST_PP_ENUM_PARAMS(N, typename T_)>
+ static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t))
         {
- return type(std::forward<T0>(t0),
+ return type(std::forward<T_0>(t0),
                         deque_keyed_values_impl<
                         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, _)));
         }

Modified: trunk/boost/fusion/container/deque/detail/pp_as_deque.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/pp_as_deque.hpp (original)
+++ trunk/boost/fusion/container/deque/detail/pp_as_deque.hpp 2013-01-27 07:15:26 EST (Sun, 27 Jan 2013)
@@ -78,7 +78,7 @@
     typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
         BOOST_PP_CAT(T, n);
 
-#define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/as_deque.hpp>
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/pp_as_deque.hpp>
 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
 #include BOOST_PP_ITERATE()
 

Modified: trunk/boost/fusion/container/deque/detail/pp_deque.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/pp_deque.hpp (original)
+++ trunk/boost/fusion/container/deque/detail/pp_deque.hpp 2013-01-27 07:15:26 EST (Sun, 27 Jan 2013)
@@ -92,8 +92,11 @@
             {}
 
 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- explicit deque(T0&& t0)
- : base(std::forward<T0>(t0), detail::nil_keyed_element())
+ template <typename T0_>
+ explicit deque(T0_&& t0
+ , typename enable_if<is_convertible<T0_, T0> >::type* /*dummy*/ = 0
+ )
+ : base(std::forward<T0_>(t0), detail::nil_keyed_element())
             {}
 
         explicit deque(deque&& rhs)
@@ -145,6 +148,28 @@
 #endif
 
     };
+
+ template <>
+ struct deque<> : detail::nil_keyed_element
+ {
+ typedef deque_tag fusion_tag;
+ typedef bidirectional_traversal_tag category;
+ typedef mpl::int_<0> size;
+ typedef mpl::int_<0> next_up;
+ typedef mpl::int_<0> next_down;
+ typedef mpl::false_ is_view;
+
+ template <typename Sequence>
+ deque(Sequence const&,
+ typename enable_if<
+ mpl::and_<
+ traits::is_sequence<Sequence>
+ , result_of::empty<Sequence>>>::type* /*dummy*/ = 0)
+ {}
+
+ deque() {}
+ };
+
 }}
 
 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)

Modified: trunk/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp (original)
+++ trunk/boost/fusion/container/deque/detail/pp_deque_keyed_values.hpp 2013-01-27 07:15:26 EST (Sun, 27 Jan 2013)
@@ -68,7 +68,7 @@
     {
         typedef nil_keyed_element type;
 
- static type call()
+ static type construct()
         {
             return type();
         }

Modified: trunk/boost/fusion/container/generation/detail/pp_deque_tie.hpp
==============================================================================
--- trunk/boost/fusion/container/generation/detail/pp_deque_tie.hpp (original)
+++ trunk/boost/fusion/container/generation/detail/pp_deque_tie.hpp 2013-01-27 07:15:26 EST (Sun, 27 Jan 2013)
@@ -6,8 +6,8 @@
     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_PP_DEQUE_TIE_07192005_1242)
+#define FUSION_PP_DEQUE_TIE_07192005_1242
 
 #include <boost/preprocessor/iterate.hpp>
 #include <boost/preprocessor/cat.hpp>
@@ -53,7 +53,7 @@
 
 #define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
 
-#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/deque_tie.hpp>
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_deque_tie.hpp>
 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
 #include BOOST_PP_ITERATE()
 

Modified: trunk/boost/fusion/container/generation/detail/pp_make_deque.hpp
==============================================================================
--- trunk/boost/fusion/container/generation/detail/pp_make_deque.hpp (original)
+++ trunk/boost/fusion/container/generation/detail/pp_make_deque.hpp 2013-01-27 07:15:26 EST (Sun, 27 Jan 2013)
@@ -6,8 +6,8 @@
     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
+#if !defined(FUSION_PP_MAKE_DEQUE_07162005_0243)
+#define FUSION_MAKE_PP_DEQUE_07162005_0243
 
 #include <boost/preprocessor/iterate.hpp>
 #include <boost/preprocessor/repetition/enum_params.hpp>
@@ -66,7 +66,10 @@
 #define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
     typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
 
-#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_deque.hpp>
+#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
+ typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_deque.hpp>
 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
 #include BOOST_PP_ITERATE()
 

Modified: trunk/boost/fusion/container/vector/detail/vector_forward_ctor.hpp
==============================================================================
--- trunk/boost/fusion/container/vector/detail/vector_forward_ctor.hpp (original)
+++ trunk/boost/fusion/container/vector/detail/vector_forward_ctor.hpp 2013-01-27 07:15:26 EST (Sun, 27 Jan 2013)
@@ -12,14 +12,14 @@
 #include <boost/preprocessor/repetition/enum_params.hpp>
 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
 
-#define FUSION_FORWARD_CTOR_MOVE(z, n, _) std::move(_##n)
+#define FUSION_FORWARD_CTOR_FORWARD(z, n, _) std::forward<U##n>(_##n)
 
 #define BOOST_PP_FILENAME_1 \
     <boost/fusion/container/vector/detail/vector_forward_ctor.hpp>
 #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)
 ///////////////////////////////////////////////////////////////////////////////
@@ -43,7 +43,7 @@
     explicit
 #endif
     vector(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _))
- : vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_MOVE, _)) {}
+ : vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_FORWARD, _)) {}
 #endif
 
 #undef N


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk