Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78106 - in trunk/boost/fusion/container/deque: . detail
From: joel_at_[hidden]
Date: 2012-04-21 02:09:56


Author: djowel
Date: 2012-04-21 02:09:54 EDT (Sat, 21 Apr 2012)
New Revision: 78106
URL: http://svn.boost.org/trac/boost/changeset/78106

Log:
rearranging files
Added:
   trunk/boost/fusion/container/deque/detail/cpp03_deque.hpp
      - copied unchanged from r77967, /trunk/boost/fusion/container/deque/cpp03_deque.hpp
   trunk/boost/fusion/container/deque/detail/cpp03_deque_fwd.hpp
      - copied unchanged from r77967, /trunk/boost/fusion/container/deque/cpp03_deque_fwd.hpp
Removed:
   trunk/boost/fusion/container/deque/cpp03_deque.hpp
   trunk/boost/fusion/container/deque/cpp03_deque_fwd.hpp
   trunk/boost/fusion/container/deque/cpp11_deque.hpp
   trunk/boost/fusion/container/deque/cpp11_deque_fwd.hpp
Text files modified:
   trunk/boost/fusion/container/deque/deque.hpp | 84 ++++++++++++++++++++++++++++++++++++++-
   trunk/boost/fusion/container/deque/deque_fwd.hpp | 17 ++++++-
   trunk/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp | 4
   3 files changed, 97 insertions(+), 8 deletions(-)

Deleted: trunk/boost/fusion/container/deque/cpp03_deque.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/cpp03_deque.hpp 2012-04-21 02:09:54 EDT (Sat, 21 Apr 2012)
+++ (empty file)
@@ -1,125 +0,0 @@
-/*=============================================================================
- Copyright (c) 2005-2012 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_CPP03_FUSION_DEQUE_26112006_1649)
-#define BOOST_CPP03_FUSION_DEQUE_26112006_1649
-
-#if defined(BOOST_FUSION_HAS_CPP11_DEQUE)
-#error "C++03 only! This file should not have been included"
-#endif
-
-#include <boost/fusion/container/deque/limits.hpp>
-#include <boost/fusion/container/deque/front_extended_deque.hpp>
-#include <boost/fusion/container/deque/back_extended_deque.hpp>
-#include <boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp>
-#include <boost/fusion/container/deque/detail/deque_initial_size.hpp>
-#include <boost/fusion/support/sequence_base.hpp>
-#include <boost/fusion/container/deque/detail/keyed_element.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/type_traits/add_reference.hpp>
-#include <boost/type_traits/add_const.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-#include <boost/fusion/container/deque/deque_fwd.hpp>
-#include <boost/fusion/container/deque/detail/value_at_impl.hpp>
-#include <boost/fusion/container/deque/detail/at_impl.hpp>
-#include <boost/fusion/container/deque/detail/begin_impl.hpp>
-#include <boost/fusion/container/deque/detail/end_impl.hpp>
-#include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-#include <boost/mpl/bool.hpp>
-
-#include <boost/fusion/support/sequence_base.hpp>
-#include <boost/fusion/support/void.hpp>
-#include <boost/utility/enable_if.hpp>
-
-#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
-#include <boost/fusion/container/deque/detail/preprocessed/deque.hpp>
-#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")
-#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 deque_tag;
-
- template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)>
- struct deque
- :
- detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type,
- sequence_base<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> >
- {
- typedef deque_tag fusion_tag;
- typedef bidirectional_traversal_tag category;
- typedef typename detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type base;
- typedef typename detail::deque_initial_size<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type size;
- typedef mpl::int_<size::value> next_up;
- typedef mpl::int_<
- mpl::if_<mpl::equal_to<size, mpl::int_<0> >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down;
- typedef mpl::false_ is_view;
-
-#include <boost/fusion/container/deque/detail/deque_forward_ctor.hpp>
-
- deque()
- {}
-
- explicit deque(typename add_reference<typename add_const<T0>::type>::type t0)
- : base(t0, detail::nil_keyed_element())
- {}
-
- template<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
- deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& seq)
- : base(seq)
- {}
-
- template<typename Sequence>
- deque(Sequence const& seq, typename disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0)
- : base(base::from_iterator(fusion::begin(seq)))
- {}
-
- template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename U)>
- deque&
- operator=(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)> const& rhs)
- {
- base::operator=(rhs);
- return *this;
- }
-
- template <typename T>
- deque&
- operator=(T const& rhs)
- {
- base::operator=(rhs);
- 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

Deleted: trunk/boost/fusion/container/deque/cpp03_deque_fwd.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/cpp03_deque_fwd.hpp 2012-04-21 02:09:54 EDT (Sat, 21 Apr 2012)
+++ (empty file)
@@ -1,54 +0,0 @@
-/*=============================================================================
- Copyright (c) 2005-2012 Joel de Guzman
- Copyright (c) 2005-2007 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(FUSION_CPP03_DEQUE_FORWARD_02092007_0749)
-#define FUSION_CPP03_DEQUE_FORWARD_02092007_0749
-
-#if defined(BOOST_FUSION_HAS_CPP11_DEQUE)
-#error "C++03 only! This file should not have been included"
-#endif
-
-#include <boost/fusion/container/deque/limits.hpp>
-#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
-
-#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
-#include <boost/fusion/container/deque/detail/preprocessed/deque_fwd.hpp>
-#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")
-#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_;
-
- template<
- BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
- FUSION_MAX_DEQUE_SIZE, typename T, void_)>
- struct deque;
-}}
-
-#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
-#pragma wave option(output: null)
-#endif
-
-#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
-
-#endif

Deleted: trunk/boost/fusion/container/deque/cpp11_deque.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/cpp11_deque.hpp 2012-04-21 02:09:54 EDT (Sat, 21 Apr 2012)
+++ (empty file)
@@ -1,87 +0,0 @@
-/*=============================================================================
- Copyright (c) 2005-2012 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_CPP03_FUSION_DEQUE_26112006_1649)
-#define BOOST_CPP03_FUSION_DEQUE_26112006_1649
-
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/add_const.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-#include <boost/fusion/support/sequence_base.hpp>
-#include <boost/fusion/support/detail/access.hpp>
-#include <boost/fusion/container/deque/detail/keyed_element.hpp>
-#include <boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp>
-#include <boost/fusion/container/deque/deque_fwd.hpp>
-#include <boost/fusion/container/deque/detail/value_at_impl.hpp>
-#include <boost/fusion/container/deque/detail/at_impl.hpp>
-#include <boost/fusion/container/deque/detail/begin_impl.hpp>
-#include <boost/fusion/container/deque/detail/end_impl.hpp>
-#include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-
-#include <boost/mpl/int.hpp>
-#include <boost/utility/enable_if.hpp>
-
-namespace boost { namespace fusion
-{
- struct deque_tag;
-
- template <typename ...Elements>
- struct deque : detail::nil_keyed_element
- {
- };
-
- template <typename Head, typename ...Tail>
- struct deque<Head, Tail...>
- : detail::deque_keyed_values<Head, Tail...>::type
- , sequence_base<deque<Head, Tail...>>
- {
- typedef deque_tag fusion_tag;
- typedef bidirectional_traversal_tag category;
- typedef typename detail::deque_keyed_values<Head, Tail...>::type base;
- typedef mpl::int_<(sizeof ...(Tail) + 1)> size;
- typedef mpl::int_<size::value> next_up;
- typedef mpl::int_<mpl::int_<((size::value == 0) ? 0 : -1)>::type::value> next_down;
- typedef mpl::false_ is_view;
-
- deque()
- {}
-
- template <typename ...Elements>
- deque(deque<Elements...> const& seq)
- : base(seq)
- {}
-
- explicit deque(typename detail::call_param<Head>::type head
- , typename detail::call_param<Tail>::type... tail)
- : base(detail::deque_keyed_values<Head, Tail...>::call(head, tail...))
- {}
-
- template <typename Sequence>
- explicit deque(Sequence const& seq
- , typename disable_if<is_convertible<Sequence, Head> >::type* /*dummy*/ = 0)
- : base(base::from_iterator(fusion::begin(seq)))
- {}
-
- template <typename ...Elements>
- deque& operator=(deque<Elements...> const& rhs)
- {
- base::operator=(rhs);
- return *this;
- }
-
- template <typename T>
- deque& operator=(T const& rhs)
- {
- base::operator=(rhs);
- return *this;
- }
- };
-}}
-
-#endif

Deleted: trunk/boost/fusion/container/deque/cpp11_deque_fwd.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/cpp11_deque_fwd.hpp 2012-04-21 02:09:54 EDT (Sat, 21 Apr 2012)
+++ (empty file)
@@ -1,19 +0,0 @@
-/*=============================================================================
- Copyright (c) 2005-2012 Joel de Guzman
- Copyright (c) 2005-2007 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(FUSION_CPP11_DEQUE_FORWARD_04072012_0355)
-#define FUSION_CPP11_DEQUE_FORWARD_04072012_0355
-
-namespace boost { namespace fusion
-{
- struct void_;
-
- template <typename ...T>
- struct deque;
-}}
-
-#endif

Modified: trunk/boost/fusion/container/deque/deque.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/deque.hpp (original)
+++ trunk/boost/fusion/container/deque/deque.hpp 2012-04-21 02:09:54 EDT (Sat, 21 Apr 2012)
@@ -10,15 +10,93 @@
 
 #include <boost/config.hpp>
 
+///////////////////////////////////////////////////////////////////////////////
+// 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 <boost/fusion/container/deque/cpp03_deque.hpp>
+# include <boost/fusion/container/deque/detail/cpp03_deque.hpp>
 #else
 # if !defined(BOOST_FUSION_HAS_CPP11_DEQUE)
 # define BOOST_FUSION_HAS_CPP11_DEQUE
 # endif
-# include <boost/fusion/container/deque/cpp11_deque.hpp>
-#endif
 
+///////////////////////////////////////////////////////////////////////////////
+// C++11 interface
+///////////////////////////////////////////////////////////////////////////////
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/detail/access.hpp>
+#include <boost/fusion/container/deque/detail/keyed_element.hpp>
+#include <boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp>
+#include <boost/fusion/container/deque/deque_fwd.hpp>
+#include <boost/fusion/container/deque/detail/value_at_impl.hpp>
+#include <boost/fusion/container/deque/detail/at_impl.hpp>
+#include <boost/fusion/container/deque/detail/begin_impl.hpp>
+#include <boost/fusion/container/deque/detail/end_impl.hpp>
+#include <boost/fusion/container/deque/detail/is_sequence_impl.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+
+#include <boost/mpl/int.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+namespace boost { namespace fusion
+{
+ struct deque_tag;
+
+ template <typename ...Elements>
+ struct deque : detail::nil_keyed_element
+ {
+ };
+
+ template <typename Head, typename ...Tail>
+ struct deque<Head, Tail...>
+ : detail::deque_keyed_values<Head, Tail...>::type
+ , sequence_base<deque<Head, Tail...>>
+ {
+ typedef deque_tag fusion_tag;
+ typedef bidirectional_traversal_tag category;
+ typedef typename detail::deque_keyed_values<Head, Tail...>::type base;
+ typedef mpl::int_<(sizeof ...(Tail) + 1)> size;
+ typedef mpl::int_<size::value> next_up;
+ typedef mpl::int_<mpl::int_<((size::value == 0) ? 0 : -1)>::type::value> next_down;
+ typedef mpl::false_ is_view;
+
+ deque()
+ {}
+
+ template <typename ...Elements>
+ deque(deque<Elements...> const& seq)
+ : base(seq)
+ {}
+
+ explicit deque(typename detail::call_param<Head>::type head
+ , typename detail::call_param<Tail>::type... tail)
+ : base(detail::deque_keyed_values<Head, Tail...>::call(head, tail...))
+ {}
+
+ template <typename Sequence>
+ explicit deque(Sequence const& seq
+ , typename disable_if<is_convertible<Sequence, Head> >::type* /*dummy*/ = 0)
+ : base(base::from_iterator(fusion::begin(seq)))
+ {}
+
+ template <typename ...Elements>
+ deque& operator=(deque<Elements...> const& rhs)
+ {
+ base::operator=(rhs);
+ return *this;
+ }
+
+ template <typename T>
+ deque& operator=(T const& rhs)
+ {
+ base::operator=(rhs);
+ return *this;
+ }
+ };
+}}
+
+#endif
 #endif

Modified: trunk/boost/fusion/container/deque/deque_fwd.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/deque_fwd.hpp (original)
+++ trunk/boost/fusion/container/deque/deque_fwd.hpp 2012-04-21 02:09:54 EDT (Sat, 21 Apr 2012)
@@ -10,15 +10,26 @@
 
 #include <boost/config.hpp>
 
+///////////////////////////////////////////////////////////////////////////////
+// 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 <boost/fusion/container/deque/cpp03_deque_fwd.hpp>
+# include <boost/fusion/container/deque/detail/cpp03_deque_fwd.hpp>
 #else
 # if !defined(BOOST_FUSION_HAS_CPP11_DEQUE)
 # define BOOST_FUSION_HAS_CPP11_DEQUE
 # endif
-# include <boost/fusion/container/deque/cpp11_deque_fwd.hpp>
-#endif
 
+///////////////////////////////////////////////////////////////////////////////
+// C++11 interface
+///////////////////////////////////////////////////////////////////////////////
+namespace boost { namespace fusion
+{
+ template <typename ...T>
+ struct deque;
+}}
+
+#endif
 #endif

Modified: trunk/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp
==============================================================================
--- trunk/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp (original)
+++ trunk/boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp 2012-04-21 02:09:54 EDT (Sat, 21 Apr 2012)
@@ -29,8 +29,8 @@
         typedef keyed_element<N, Head, tail> type;
 
         static type call(
- typename add_reference<typename add_const<Head>::type>::type head
- , typename add_reference<typename add_const<Tail>::type>::type... tail)
+ typename detail::call_param<Head>::type head
+ , typename detail::call_param<Tail>::type... tail)
         {
             return type(
                 head


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