Boost logo

Boost-Commit :

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


Author: djowel
Date: 2013-01-27 02:17:01 EST (Sun, 27 Jan 2013)
New Revision: 82630
URL: http://svn.boost.org/trac/boost/changeset/82630

Log:
+ Fixes ticket #7914
+ C++11 implementations for make_deque, deque_tie and as_deque
Added:
   trunk/boost/fusion/container/deque/detail/pp_as_deque.hpp
      - copied unchanged from r82627, /trunk/boost/fusion/container/deque/detail/as_deque.hpp
   trunk/boost/fusion/container/generation/detail/pp_deque_tie.hpp (contents, props changed)
   trunk/boost/fusion/container/generation/detail/pp_make_deque.hpp (contents, props changed)
Removed:
   trunk/boost/fusion/container/deque/detail/as_deque.hpp
Text files modified:
   trunk/boost/fusion/container/deque/convert.hpp | 94 +++++++++++++++++++++++++++++++
   trunk/boost/fusion/container/deque/detail/convert_impl.hpp | 17 +++--
   trunk/boost/fusion/container/generation/deque_tie.hpp | 101 ++++++---------------------------
   trunk/boost/fusion/container/generation/make_deque.hpp | 116 ++++++---------------------------------
   trunk/boost/fusion/container/vector/detail/vector_forward_ctor.hpp | 3
   trunk/boost/fusion/container/vector/detail/vector_n.hpp | 36 ++++++++---
   6 files changed, 168 insertions(+), 199 deletions(-)

Modified: trunk/boost/fusion/container/deque/convert.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/convert.hpp (original)
+++ trunk/boost/fusion/container/deque/convert.hpp 2013-01-27 02:17:01 EST (Sun, 27 Jan 2013)
@@ -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,11 +8,100 @@
 #if !defined(FUSION_CONVERT_20061213_2207)
 #define FUSION_CONVERT_20061213_2207
 
-#include <boost/fusion/container/deque/detail/as_deque.hpp>
 #include <boost/fusion/container/deque/detail/convert_impl.hpp>
 #include <boost/fusion/container/deque/deque.hpp>
+
+#if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/container/deque/front_extended_deque.hpp>
+
+///////////////////////////////////////////////////////////////////////////////
+// C++11 variadic implementation
+///////////////////////////////////////////////////////////////////////////////
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template <typename First, typename Last
+ , bool is_empty = result_of::equal_to<First, Last>::value>
+ struct build_deque;
+
+ template <typename First, typename Last>
+ struct build_deque<First, Last, true>
+ {
+ typedef deque<> type;
+ static type
+ call(First const&, Last const&)
+ {
+ return type();
+ }
+ };
+
+ template <typename First, typename Last>
+ struct build_deque<First, Last, false>
+ {
+ typedef
+ build_deque<typename result_of::next<First>::type, Last>
+ next_build_deque;
+
+ typedef front_extended_deque<
+ typename next_build_deque::type
+ , typename result_of::value_of<First>::type>
+ type;
+
+ static type
+ call(First const& f, Last const& l)
+ {
+ typename result_of::value_of<First>::type v = *f;
+ return type(next_build_deque::call(fusion::next(f), l), v);
+ }
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Sequence>
+ struct as_deque :
+ detail::build_deque<
+ typename result_of::begin<Sequence>::type
+ , typename result_of::end<Sequence>::type
+ >
+ {
+ };
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_deque<Sequence>::type
+ as_deque(Sequence& seq)
+ {
+ typedef typename result_of::as_deque<Sequence>::gen gen;
+ return gen::call(fusion::begin(seq), fusion::end(seq));
+ }
+
+ template <typename Sequence>
+ inline typename result_of::as_deque<Sequence const>::type
+ as_deque(Sequence const& seq)
+ {
+ typedef typename result_of::as_deque<Sequence const>::gen gen;
+ return gen::call(fusion::begin(seq), fusion::end(seq));
+ }
+}}
+
+#else
+
+///////////////////////////////////////////////////////////////////////////////
+// C++03 (non-variadic) implementation
+///////////////////////////////////////////////////////////////////////////////
+
 #include <boost/fusion/sequence/intrinsic/begin.hpp>
 #include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/container/deque/detail/pp_as_deque.hpp>
 
 namespace boost { namespace fusion
 {
@@ -48,3 +137,4 @@
 }}
 
 #endif
+#endif

Deleted: trunk/boost/fusion/container/deque/detail/as_deque.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/as_deque.hpp 2013-01-27 02:17:01 EST (Sun, 27 Jan 2013)
+++ (empty file)
@@ -1,131 +0,0 @@
-/*=============================================================================
- Copyright (c) 2005-2012 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_AS_DEQUE_20061213_2210)
-#define FUSION_AS_DEQUE_20061213_2210
-
-#include <boost/preprocessor/iterate.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/inc.hpp>
-#include <boost/preprocessor/dec.hpp>
-#include <boost/fusion/container/deque/deque.hpp>
-#include <boost/fusion/iterator/value_of.hpp>
-#include <boost/fusion/iterator/deref.hpp>
-#include <boost/fusion/iterator/next.hpp>
-
-namespace boost { namespace fusion { namespace detail
-{
- template <int size>
- struct as_deque;
-
- template <>
- struct as_deque<0>
- {
- template <typename Iterator>
- struct apply
- {
- typedef deque<> type;
- };
-
- template <typename Iterator>
- static typename apply<Iterator>::type
- call(Iterator)
- {
- return deque<>();
- }
- };
-}}}
-
-#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
-#include <boost/fusion/container/deque/detail/preprocessed/as_deque.hpp>
-#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")
-#endif
-
-/*=============================================================================
- Copyright (c) 2001-2011 Joel de Guzman
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
- This is an auto-generated file. Do not edit!
-==============================================================================*/
-
-#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
-#pragma wave option(preserve: 1)
-#endif
-
-namespace boost { namespace fusion { namespace detail
-{
-#define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \
- typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \
- BOOST_PP_CAT(I, BOOST_PP_INC(n));
-
-#define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \
- typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \
- BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
-
-#define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \
- 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_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
-#include BOOST_PP_ITERATE()
-
-#undef BOOST_FUSION_NEXT_ITERATOR
-#undef BOOST_FUSION_NEXT_CALL_ITERATOR
-#undef BOOST_FUSION_VALUE_OF_ITERATOR
-
-}}}
-
-#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()
-
- template <>
- struct as_deque<N>
- {
- template <typename I0>
- struct apply
- {
- BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
- BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
- typedef deque<BOOST_PP_ENUM_PARAMS(N, T)> type;
- };
-
- template <typename Iterator>
- static typename apply<Iterator>::type
- call(Iterator const& i0)
- {
- typedef apply<Iterator> gen;
- typedef typename gen::type result;
- BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
- return result(BOOST_PP_ENUM_PARAMS(N, *i));
- }
- };
-
-#undef N
-#endif // defined(BOOST_PP_IS_ITERATING)
-

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

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

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

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

Modified: trunk/boost/fusion/container/generation/make_deque.hpp
==============================================================================
--- trunk/boost/fusion/container/generation/make_deque.hpp (original)
+++ trunk/boost/fusion/container/generation/make_deque.hpp 2013-01-27 02:17:01 EST (Sun, 27 Jan 2013)
@@ -1,47 +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)
 ==============================================================================*/
-/*=============================================================================
- 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 <boost/preprocessor/iterate.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
-#include <boost/preprocessor/repetition/repeat_from_to.hpp>
 #include <boost/fusion/container/deque/deque.hpp>
-#include <boost/fusion/support/detail/as_fusion_element.hpp>
 
-#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
-#include <boost/fusion/container/generation/detail/preprocessed/make_deque.hpp>
+#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
+# include <boost/fusion/container/generation/detail/pp_make_deque.hpp>
 #else
-#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
-#pragma wave option(preserve: 2, line: 0, output: "detail/preprocessed/make_deque" FUSION_MAX_DEQUE_SIZE_STR".hpp")
-#endif
-
-/*=============================================================================
- Copyright (c) 2001-2011 Joel de Guzman
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
- This is an auto-generated file. Do not edit!
-==============================================================================*/
+///////////////////////////////////////////////////////////////////////////////
+// C++11 variadic interface
+///////////////////////////////////////////////////////////////////////////////
 
-#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
-#pragma wave option(preserve: 1)
-#endif
+#include <boost/fusion/support/detail/as_fusion_element.hpp>
 
 namespace boost { namespace fusion
 {
@@ -49,76 +25,20 @@
 
     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 <typename ...T>
+ struct make_deque
         {
- typedef deque<> type;
+ typedef deque<T...> type;
         };
     }
 
- inline deque<>
- make_deque()
+ template <typename ...T>
+ inline deque<typename detail::as_fusion_element<T>::type...>
+ make_deque(T const&... arg)
     {
- return deque<>();
+ return deque<typename detail::as_fusion_element<T>::type...>(arg...);
     }
+ }}
 
-#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
- typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
-
-#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_deque.hpp>
-#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
-#include BOOST_PP_ITERATE()
-
-#undef BOOST_FUSION_AS_FUSION_ELEMENT
-
-}}
-
-#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
-#pragma wave option(output: null)
-#endif
-
-#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
-
-#endif
-#else // defined(BOOST_PP_IS_ITERATING)
-///////////////////////////////////////////////////////////////////////////////
-//
-// Preprocessor vertical repetition code
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#define N BOOST_PP_ITERATION()
-
- namespace result_of
- {
- template <BOOST_PP_ENUM_PARAMS(N, typename T)>
-#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
- #define TEXT(z, n, text) , text
- struct make_deque< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
- #undef TEXT
-#else
- struct make_deque<BOOST_PP_ENUM_PARAMS(N, T)>
 #endif
- {
- typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
- };
- }
-
- template <BOOST_PP_ENUM_PARAMS(N, typename T)>
- inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
- make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& _))
- {
- return deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
- BOOST_PP_ENUM_PARAMS(N, _));
- }
-
-#undef N
-#endif // defined(BOOST_PP_IS_ITERATING)
-
+#endif
\ No newline at end of file

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 02:17:01 EST (Sun, 27 Jan 2013)
@@ -38,10 +38,11 @@
         : vec(BOOST_PP_ENUM_PARAMS(N, _)) {}
 
 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template <BOOST_PP_ENUM_PARAMS(N, typename U)>
 #if N == 1
     explicit
 #endif
- vector(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _))
+ vector(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _))
         : vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_MOVE, _)) {}
 #endif
 

Modified: trunk/boost/fusion/container/vector/detail/vector_n.hpp
==============================================================================
--- trunk/boost/fusion/container/vector/detail/vector_n.hpp (original)
+++ trunk/boost/fusion/container/vector/detail/vector_n.hpp 2013-01-27 02:17:01 EST (Sun, 27 Jan 2013)
@@ -9,13 +9,13 @@
 #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_DEFAULT_INIT(z, n, _) m##n()
+#define FUSION_VECTOR_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<T##n>(other.m##n))
-#define FUSION_VECTOR_ARG_FWD(z, n, _) m##n(std::forward<T##n>(_##n))
+#define FUSION_VECTOR_ARG_FWD(z, n, _) m##n(std::forward<U##n>(_##n))
 #define FUSION_VECTOR_MEMBER_MEMBER_DECL(z, n, _) T##n m##n;
-#define FUSION_VECTOR_MEMBER_FORWARD(z, n, _) std::forward<T##n>(_##n)
+#define FUSION_VECTOR_MEMBER_FORWARD(z, n, _) std::forward<U##n>(_##n)
 
 #define FUSION_VECTOR_MEMBER_MEMBER_ASSIGN(z, n, _) \
     this->BOOST_PP_CAT(m, n) = vec.BOOST_PP_CAT(m, n);
@@ -47,17 +47,18 @@
     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_MEMBER_DEFAULT_INIT, _) {}
 
 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && _))
+ template <BOOST_PP_ENUM_PARAMS(N, typename U)>
+ BOOST_PP_CAT(vector_data, N)(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _))
             : BOOST_PP_ENUM(N, FUSION_VECTOR_ARG_FWD, _) {}
 #endif
 
         BOOST_PP_CAT(vector_data, N)(
             BOOST_PP_ENUM_BINARY_PARAMS(
                 N, typename detail::call_param<T, >::type _))
- : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_MEMBER_INIT, _) {}
+ : BOOST_PP_ENUM(N, FUSION_VECTOR_MEMBER_INIT, _) {}
 
         BOOST_PP_CAT(vector_data, N)(
             BOOST_PP_CAT(vector_data, N) const& other)
@@ -124,16 +125,24 @@
             : base_type(BOOST_PP_ENUM_PARAMS(N, _)) {}
 
 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template <BOOST_PP_ENUM_PARAMS(N, typename U)>
 #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<is_convertible<U0, T0> >::type* /*dummy*/ = 0
+ )
+ : base_type(std::forward<U0>(_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_CXX11_RVALUE_REFERENCES)
         BOOST_PP_CAT(vector, N)(BOOST_PP_CAT(vector, N)&& rhs)
             : base_type(std::forward<base_type>(rhs)) {}
+
+ BOOST_PP_CAT(vector, N)(BOOST_PP_CAT(vector, N) const& rhs)
+ : base_type(rhs) {}
+
 #endif
 
         template <BOOST_PP_ENUM_PARAMS(N, typename U)>
@@ -180,6 +189,13 @@
 
 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
         BOOST_PP_CAT(vector, N)&
+ operator=(BOOST_PP_CAT(vector, N) const& vec)
+ {
+ base_type::operator=(*this);
+ return *this;
+ }
+
+ BOOST_PP_CAT(vector, N)&
         operator=(BOOST_PP_CAT(vector, N)&& vec)
         {
             BOOST_PP_REPEAT(N, FUSION_VECTOR_MEMBER_MEMBER_FORWARD, _)


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