Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70606 - in branches/pplib/variadics/boost/preprocessor: array facilities list tuple
From: eldiener_at_[hidden]
Date: 2011-03-26 22:04:26


Author: eldiener
Date: 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
New Revision: 70606
URL: http://svn.boost.org/trac/boost/changeset/70606

Log:
Use common code and better comment.
Text files modified:
   branches/pplib/variadics/boost/preprocessor/array/enum.hpp | 2 ++
   branches/pplib/variadics/boost/preprocessor/array/to_list.hpp | 2 ++
   branches/pplib/variadics/boost/preprocessor/array/to_seq.hpp | 2 ++
   branches/pplib/variadics/boost/preprocessor/array/to_tuple.hpp | 2 ++
   branches/pplib/variadics/boost/preprocessor/facilities/overload.hpp | 4 +++-
   branches/pplib/variadics/boost/preprocessor/list/to_array.hpp | 2 ++
   branches/pplib/variadics/boost/preprocessor/list/to_seq.hpp | 2 ++
   branches/pplib/variadics/boost/preprocessor/tuple/eat.hpp | 2 ++
   branches/pplib/variadics/boost/preprocessor/tuple/elem.hpp | 14 +++++++++++---
   branches/pplib/variadics/boost/preprocessor/tuple/enum.hpp | 4 ++++
   branches/pplib/variadics/boost/preprocessor/tuple/rem.hpp | 10 +++++++---
   branches/pplib/variadics/boost/preprocessor/tuple/reverse.hpp | 3 +--
   branches/pplib/variadics/boost/preprocessor/tuple/size.hpp | 2 ++
   branches/pplib/variadics/boost/preprocessor/tuple/to_array.hpp | 12 ++++++++----
   14 files changed, 50 insertions(+), 13 deletions(-)

Modified: branches/pplib/variadics/boost/preprocessor/array/enum.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/array/enum.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/array/enum.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -16,6 +16,8 @@
 #include <boost/preprocessor/array/size.hpp>
 #include <boost/preprocessor/array/data.hpp>
 #
+# /* BOOST_PP_ARRAY_ENUM */
+#
 #define BOOST_PP_ARRAY_ENUM(array) \
   BOOST_PP_TUPLE_ENUM(BOOST_PP_ARRAY_SIZE(array),BOOST_PP_ARRAY_DATA(array)) \
 /**/

Modified: branches/pplib/variadics/boost/preprocessor/array/to_list.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/array/to_list.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/array/to_list.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -16,6 +16,8 @@
 #include <boost/preprocessor/array/size.hpp>
 #include <boost/preprocessor/array/data.hpp>
 #
+# /* BOOST_PP_ARRAY_TO_LIST */
+#
 #define BOOST_PP_ARRAY_TO_LIST(array) \
   BOOST_PP_TUPLE_TO_LIST(BOOST_PP_ARRAY_SIZE(array),BOOST_PP_ARRAY_DATA(array)) \
 /**/

Modified: branches/pplib/variadics/boost/preprocessor/array/to_seq.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/array/to_seq.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/array/to_seq.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -16,6 +16,8 @@
 #include <boost/preprocessor/array/size.hpp>
 #include <boost/preprocessor/array/data.hpp>
 #
+# /* BOOST_PP_ARRAY_TO_SEQ */
+#
 #define BOOST_PP_ARRAY_TO_SEQ(array) \
   BOOST_PP_TUPLE_TO_SEQ(BOOST_PP_ARRAY_SIZE(array),BOOST_PP_ARRAY_DATA(array)) \
 /**/

Modified: branches/pplib/variadics/boost/preprocessor/array/to_tuple.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/array/to_tuple.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/array/to_tuple.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -14,6 +14,8 @@
 #
 #include <boost/preprocessor/array/data.hpp>
 #
+# /* BOOST_PP_ARRAY_TO_TUPLE */
+#
 #define BOOST_PP_ARRAY_TO_TUPLE(array) \
   BOOST_PP_ARRAY_DATA(array) \
 /**/

Modified: branches/pplib/variadics/boost/preprocessor/facilities/overload.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/facilities/overload.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/facilities/overload.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -1,6 +1,6 @@
 # /* **************************************************************************
 # * *
-# * (C) Copyright Edward Diener 2011.
+# * (C) Copyright Paul Mensonides 2011.
 # * 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)
@@ -19,6 +19,8 @@
 # include <boost/preprocessor/cat.hpp>
 # include <boost/preprocessor/variadic/size.hpp>
 #
+# /* BOOST_PP_OVERLOAD */
+#
 #define BOOST_PP_OVERLOAD(prefix, ...) \
   BOOST_PP_CAT(prefix, BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)) \
 /**/

Modified: branches/pplib/variadics/boost/preprocessor/list/to_array.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/list/to_array.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/list/to_array.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -16,6 +16,8 @@
 #include <boost/preprocessor/list/to_tuple.hpp>
 #include <boost/preprocessor/list/size.hpp>
 #
+# /* BOOST_PP_LIST_TO_ARRAY */
+#
 #define BOOST_PP_LIST_TO_ARRAY(list) \
   BOOST_PP_TUPLE_TO_ARRAY(BOOST_PP_LIST_SIZE(list),BOOST_PP_LIST_TO_TUPLE(list)) \
 /**/

Modified: branches/pplib/variadics/boost/preprocessor/list/to_seq.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/list/to_seq.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/list/to_seq.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -16,6 +16,8 @@
 #include <boost/preprocessor/list/to_tuple.hpp>
 #include <boost/preprocessor/list/size.hpp>
 #
+# /* BOOST_PP_LIST_TO_SEQ */
+#
 #define BOOST_PP_LIST_TO_SEQ(list) \
   BOOST_PP_TUPLE_TO_SEQ(BOOST_PP_LIST_SIZE(list),BOOST_PP_LIST_TO_TUPLE(list)) \
 /**/

Modified: branches/pplib/variadics/boost/preprocessor/tuple/eat.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/tuple/eat.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/tuple/eat.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -18,6 +18,8 @@
 #
 # if BOOST_PP_VARIADICS
 #
+# /* BOOST_PP_TUPLE_EAT */
+#
 #define BOOST_PP_TUPLE_EAT(size) BOOST_PP_DETAIL_TUPLE_EAT
 #define BOOST_PP_DETAIL_TUPLE_EAT(...)
 #

Modified: branches/pplib/variadics/boost/preprocessor/tuple/elem.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/tuple/elem.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/tuple/elem.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -22,16 +22,24 @@
 # include <boost/preprocessor/tuple/enum.hpp>
 # include <boost/preprocessor/variadic/elem.hpp>
 #
+# /* BOOST_PP_TUPLE_ELEM */
+#
 # define BOOST_PP_TUPLE_ELEM(...) \
- BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_, __VA_ARGS__)(__VA_ARGS__) \
+ BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_DETAIL_ELEM_, __VA_ARGS__)(__VA_ARGS__) \
+ /**/
+# define BOOST_PP_TUPLE_DETAIL_ELEM_2(i, tuple) \
+ BOOST_PP_VARIADIC_ELEM(i,BOOST_PP_TUPLE_ENUM(tuple)) \
+ /**/
+# define BOOST_PP_TUPLE_DETAIL_ELEM_3(size, i, tuple) \
+ BOOST_PP_TUPLE_DETAIL_ELEM_2(i, tuple) \
          /**/
-# define BOOST_PP_TUPLE_ELEM_2(i, tuple) BOOST_PP_VARIADIC_ELEM(i,BOOST_PP_TUPLE_ENUM(tuple))
-# define BOOST_PP_TUPLE_ELEM_3(size, i, tuple) BOOST_PP_TUPLE_ELEM_2(i, tuple)
 #
 # else
 #
 # include <boost/preprocessor/config/config.hpp>
 #
+# /* BOOST_PP_TUPLE_ELEM */
+#
 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
 # define BOOST_PP_TUPLE_ELEM(size, index, tuple) BOOST_PP_TUPLE_ELEM_I(size, index, tuple)
 # else

Modified: branches/pplib/variadics/boost/preprocessor/tuple/enum.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/tuple/enum.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/tuple/enum.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -18,6 +18,8 @@
 #
 # include <boost/preprocessor/facilties/overload.hpp>
 #
+# /* BOOST_PP_TUPLE_ENUM */
+#
 #define BOOST_PP_TUPLE_ENUM(...) \
   BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ENUM_, __VA_ARGS__)(__VA_ARGS__) \
 /**/
@@ -37,6 +39,8 @@
 #
 #include <boost/preprocessor/tuple/rem.hpp>
 #
+# /* BOOST_PP_TUPLE_ENUM */
+#
 #define BOOST_PP_TUPLE_ENUM(size, tuple) \
   BOOST_PP_TUPLE_REM_CTOR(size, tuple) \
 /**/

Modified: branches/pplib/variadics/boost/preprocessor/tuple/rem.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/tuple/rem.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/tuple/rem.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -18,14 +18,18 @@
 #
 # include <boost/preprocessor/facilities/overload.hpp>
 #
+# /* BOOST_PP_TUPLE_REM */
+#
 #define BOOST_PP_TUPLE_REM(size) BOOST_PP_DETAIL_TUPLE_REM
 #define BOOST_PP_DETAIL_TUPLE_REM(...) __VA_ARGS__
 #
+# /* BOOST_PP_TUPLE_REM_CTOR */
+#
 # define BOOST_PP_TUPLE_REM_CTOR(...) \
- BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_, __VA_ARGS__)(__VA_ARGS__) \
+ BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_DETAIL_REM_CTOR_, __VA_ARGS__)(__VA_ARGS__) \
          /**/
-# define BOOST_PP_TUPLE_REM_CTOR_1(tuple) BOOST_PP_DETAIL_TUPLE_REM tuple
-# define BOOST_PP_TUPLE_REM_CTOR_2(size, tuple) BOOST_PP_TUPLE_REM_CTOR_1(tuple)
+# define BOOST_PP_TUPLE_DETAIL_REM_CTOR_1(tuple) BOOST_PP_DETAIL_TUPLE_REM tuple
+# define BOOST_PP_TUPLE_DETAIL_REM_CTOR_2(size, tuple) BOOST_PP_TUPLE_DETAIL_REM_CTOR_1(tuple)
 #
 # else
 #

Modified: branches/pplib/variadics/boost/preprocessor/tuple/reverse.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/tuple/reverse.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/tuple/reverse.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -14,6 +14,7 @@
 # ifndef BOOST_PREPROCESSOR_TUPLE_REVERSE_HPP
 # define BOOST_PREPROCESSOR_TUPLE_REVERSE_HPP
 #
+# include <boost/preprocessor/config/config.hpp>
 # include <boost/preprocessor/config/variadics.hpp>
 #
 # if BOOST_PP_VARIADICS
@@ -39,8 +40,6 @@
 #
 # endif // BOOST_PP_VARIADICS
 #
-# include <boost/preprocessor/config/config.hpp>
-#
 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
 # define BOOST_PP_TUPLE_REVERSE_COMMON(size, tuple) BOOST_PP_TUPLE_REVERSE_I(size, tuple)
 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()

Modified: branches/pplib/variadics/boost/preprocessor/tuple/size.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/tuple/size.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/tuple/size.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -18,6 +18,8 @@
 #
 # include <boost/preprocessor/variadic/size.hpp>
 #
+# /* BOOST_PP_TUPLE_SIZE */
+#
 #define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple
 #
 #endif // BOOST_PP_VARIADICS

Modified: branches/pplib/variadics/boost/preprocessor/tuple/to_array.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/tuple/to_array.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/tuple/to_array.hpp 2011-03-26 22:04:24 EDT (Sat, 26 Mar 2011)
@@ -19,18 +19,22 @@
 # include <boost/preprocessor/facilities/overload.hpp>
 # include <boost/preprocessor/tuple/size.hpp>
 #
+# /* BOOST_PP_TUPLE_TO_ARRAY */
+#
 # define BOOST_PP_TUPLE_TO_ARRAY(...) \
- BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_ARRAY_, __VA_ARGS__)(__VA_ARGS__) \
+ BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_DETAIL_TO_ARRAY_, __VA_ARGS__)(__VA_ARGS__) \
   /**/
-# define BOOST_PP_TUPLE_TO_ARRAY_1(tuple) \
- BOOST_PP_TUPLE_TO_ARRAY_2(BOOST_PP_TUPLE_SIZE(tuple),tuple) \
+# define BOOST_PP_TUPLE_DETAIL_TO_ARRAY_1(tuple) \
+ BOOST_PP_TUPLE_DETAIL_TO_ARRAY_2(BOOST_PP_TUPLE_SIZE(tuple),tuple) \
   /**/
-# define BOOST_PP_TUPLE_TO_ARRAY_2(size, tuple) \
+# define BOOST_PP_TUPLE_DETAIL_TO_ARRAY_2(size, tuple) \
   ( size, tuple ) \
 /**/
 #
 # else
 #
+# /* BOOST_PP_TUPLE_TO_ARRAY */
+#
 #define BOOST_PP_TUPLE_TO_ARRAY(size,tuple) \
   ( size, tuple ) \
 /**/


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