Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72833 - in branches/pplib/v2: boost/preprocessor boost/preprocessor/facilities libs/preprocessor/test
From: eldiener_at_[hidden]
Date: 2011-07-01 12:37:02


Author: eldiener
Date: 2011-07-01 12:37:01 EDT (Fri, 01 Jul 2011)
New Revision: 72833
URL: http://svn.boost.org/trac/boost/changeset/72833

Log:
Upfates for variadic tuple check.
Added:
   branches/pplib/v2/boost/preprocessor/facilities/is_tuple_begin.hpp (contents, props changed)
Text files modified:
   branches/pplib/v2/boost/preprocessor/facilities.hpp | 1 +
   branches/pplib/v2/boost/preprocessor/facilities/is_tuple.hpp | 23 ++---------------------
   branches/pplib/v2/libs/preprocessor/test/Jamfile.v2 | 6 +++++-
   branches/pplib/v2/libs/preprocessor/test/facilities.c | 9 +++++++++
   branches/pplib/v2/libs/preprocessor/test/facilities.cpp | 9 +++++++++
   5 files changed, 26 insertions(+), 22 deletions(-)

Modified: branches/pplib/v2/boost/preprocessor/facilities.hpp
==============================================================================
--- branches/pplib/v2/boost/preprocessor/facilities.hpp (original)
+++ branches/pplib/v2/boost/preprocessor/facilities.hpp 2011-07-01 12:37:01 EDT (Fri, 01 Jul 2011)
@@ -19,6 +19,7 @@
 # include <boost/preprocessor/facilities/identity.hpp>
 # include <boost/preprocessor/facilities/intercept.hpp>
 # include <boost/preprocessor/facilities/is_tuple.hpp>
+# include <boost/preprocessor/facilities/is_tuple_begin.hpp>
 # include <boost/preprocessor/facilities/overload.hpp>
 #
 # endif

Modified: branches/pplib/v2/boost/preprocessor/facilities/is_tuple.hpp
==============================================================================
--- branches/pplib/v2/boost/preprocessor/facilities/is_tuple.hpp (original)
+++ branches/pplib/v2/boost/preprocessor/facilities/is_tuple.hpp 2011-07-01 12:37:01 EDT (Fri, 01 Jul 2011)
@@ -13,42 +13,23 @@
 # define BOOST_PREPROCESSOR_FACILITIES_IS_TUPLE_HPP
 #
 # include <boost/preprocessor/config/config.hpp>
-# include <boost/preprocessor/arithmetic/dec.hpp>
 # include <boost/preprocessor/control/iif.hpp>
 # include <boost/preprocessor/facilities/is_empty.hpp>
-# include <boost/preprocessor/variadic/size.hpp>
+# include <boost/preprocessor/facilities/is_tuple_begin.hpp>
 #
 # /* BOOST_PP_IS_TUPLE */
 #
 # if BOOST_PP_VARIADICS
 # define BOOST_PP_IS_TUPLE(x) \
- BOOST_PP_IS_TUPLE_DETAIL_HAS_ONLY_PARENS(x) \
-/**/
-#
-# define BOOST_PP_IS_TUPLE_DETAIL_HAS_ONLY_PARENS(x) \
     BOOST_PP_IIF \
       ( \
- BOOST_PP_IS_TUPLE_DETAIL_HAS_PARENS_BEGIN(x), \
+ BOOST_PP_IS_TUPLE_BEGIN(x), \
       BOOST_PP_IS_TUPLE_DETAIL_IS_NOT_AFTER, \
       BOOST_PP_IS_TUPLE_DETAIL_GEN_ZERO \
       ) \
     (x) \
 /**/
 #
-# define BOOST_PP_IS_TUPLE_DETAIL_HAS_PARENS_BEGIN(x) \
- BOOST_PP_DEC \
- ( \
- BOOST_PP_VARIADIC_SIZE \
- ( \
- BOOST_PP_IS_TUPLE_DETAIL_EXPAND x \
- ) \
- ) \
-/**/
-#
-# define BOOST_PP_IS_TUPLE_DETAIL_EXPAND(...) \
- 1,1 \
-/**/
-#
 # define BOOST_PP_IS_TUPLE_DETAIL_IS_NOT_AFTER(x) \
     BOOST_PP_IS_EMPTY(BOOST_PP_IS_TUPLE_DETAIL_EXPAND_AFTER x) \
 /**/

Added: branches/pplib/v2/boost/preprocessor/facilities/is_tuple_begin.hpp
==============================================================================
--- (empty file)
+++ branches/pplib/v2/boost/preprocessor/facilities/is_tuple_begin.hpp 2011-07-01 12:37:01 EDT (Fri, 01 Jul 2011)
@@ -0,0 +1,37 @@
+# /* **************************************************************************
+# * *
+# * (C) Copyright Edward Diener 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) *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_TUPLE_BEGIN_HPP
+# define BOOST_PREPROCESSOR_FACILITIES_IS_TUPLE_BEGIN_HPP
+#
+# include <boost/preprocessor/config/config.hpp>
+# include <boost/preprocessor/arithmetic/dec.hpp>
+# include <boost/preprocessor/variadic/size.hpp>
+#
+# /* BOOST_PP_IS_TUPLE */
+#
+# if BOOST_PP_VARIADICS
+# define BOOST_PP_IS_TUPLE_BEGIN(x) \
+ BOOST_PP_DEC \
+ ( \
+ BOOST_PP_VARIADIC_SIZE \
+ ( \
+ BOOST_PP_IS_TUPLE_BEGIN_DETAIL_EXPAND x \
+ ) \
+ ) \
+/**/
+#
+# define BOOST_PP_IS_TUPLE_BEGIN_DETAIL_EXPAND(...) \
+ 1,1 \
+/**/
+#
+# endif /* BOOST_PP_VARIADICS */
+# endif /* BOOST_PREPROCESSOR_IS_TUPLE_BEGIN_HPP */

Modified: branches/pplib/v2/libs/preprocessor/test/Jamfile.v2
==============================================================================
--- branches/pplib/v2/libs/preprocessor/test/Jamfile.v2 (original)
+++ branches/pplib/v2/libs/preprocessor/test/Jamfile.v2 2011-07-01 12:37:01 EDT (Fri, 01 Jul 2011)
@@ -97,7 +97,11 @@
           : variadic_gcc
         ]
   :
- <toolset>gcc
+ <toolset>gcc-4.3.0
+ <toolset>gcc-4.4.0
+ <toolset>gcc-4.5.0
+ <toolset>gcc-4.5.2
+ <toolset>gcc-4.6.0
   ;
 
 test-suite preprocessor_gcc ;

Modified: branches/pplib/v2/libs/preprocessor/test/facilities.c
==============================================================================
--- branches/pplib/v2/libs/preprocessor/test/facilities.c (original)
+++ branches/pplib/v2/libs/preprocessor/test/facilities.c 2011-07-01 12:37:01 EDT (Fri, 01 Jul 2011)
@@ -45,4 +45,13 @@
 BEGIN BOOST_PP_IS_TUPLE(TUPLE_VERY_LARGE A green test) == 0 END
 BEGIN BOOST_PP_IS_TUPLE((4,8,ty,2)yz) == 0 END
 
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(TUPLE) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(TUPLE_LARGE) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(TUPLE_VERY_LARGE) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN((4,8,ty,2)) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(A green test) == 0 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(TUPLE_VERY_LARGE A green test) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN((4,8,ty,2)yz) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(A green test(3.x.t)) == 0 END
+
 #endif

Modified: branches/pplib/v2/libs/preprocessor/test/facilities.cpp
==============================================================================
--- branches/pplib/v2/libs/preprocessor/test/facilities.cpp (original)
+++ branches/pplib/v2/libs/preprocessor/test/facilities.cpp 2011-07-01 12:37:01 EDT (Fri, 01 Jul 2011)
@@ -45,4 +45,13 @@
 BEGIN BOOST_PP_IS_TUPLE(TUPLE_VERY_LARGE A green test) == 0 END
 BEGIN BOOST_PP_IS_TUPLE((4,8,ty,2)yz) == 0 END
 
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(TUPLE) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(TUPLE_LARGE) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(TUPLE_VERY_LARGE) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN((4,8,ty,2)) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(A green test) == 0 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(TUPLE_VERY_LARGE A green test) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN((4,8,ty,2)yz) == 1 END
+BEGIN BOOST_PP_IS_TUPLE_BEGIN(A green test(3.x.t)) == 0 END
+
 #endif


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