Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73356 - in branches/pplib/v2: boost/preprocessor/debug libs/preprocessor/test
From: eldiener_at_[hidden]
Date: 2011-07-25 08:28:30


Author: eldiener
Date: 2011-07-25 08:28:29 EDT (Mon, 25 Jul 2011)
New Revision: 73356
URL: http://svn.boost.org/trac/boost/changeset/73356

Log:
Updated assert for seqs.
Text files modified:
   branches/pplib/v2/boost/preprocessor/debug/assert_is_seq.hpp | 57 ++++++++++++++++++++++++++++++++-------
   branches/pplib/v2/libs/preprocessor/test/Jamfile.v2 | 1
   branches/pplib/v2/libs/preprocessor/test/debug.cxx | 4 --
   3 files changed, 47 insertions(+), 15 deletions(-)

Modified: branches/pplib/v2/boost/preprocessor/debug/assert_is_seq.hpp
==============================================================================
--- branches/pplib/v2/boost/preprocessor/debug/assert_is_seq.hpp (original)
+++ branches/pplib/v2/boost/preprocessor/debug/assert_is_seq.hpp 2011-07-25 08:28:29 EDT (Mon, 25 Jul 2011)
@@ -19,6 +19,7 @@
 # include <boost/preprocessor/control/iif.hpp>
 # include <boost/preprocessor/control/while.hpp>
 # include <boost/preprocessor/debug/assert.hpp>
+# include <boost/preprocessor/facilities/expand.hpp>
 # include <boost/preprocessor/facilities/is_empty.hpp>
 # include <boost/preprocessor/facilities/is_tuple_begin.hpp>
 # include <boost/preprocessor/logical/not.hpp>
@@ -34,7 +35,7 @@
 # else
 #
 # define BOOST_PP_ASSERT_IS_SEQ(x) \
- BOOST_PP_IS_SEQ_DETAIL_EMPTY_F \
+ BOOST_PP_IS_SEQ_DETAIL_CHECK_RETURN_FAILURE \
       ( \
       BOOST_PP_WHILE \
         ( \
@@ -139,6 +140,38 @@
     (x) \
 /**/
 #
+# if BOOST_PP_VARIADICS_MSVC
+# define BOOST_PP_IS_SEQ_DETAIL_ASSERT_FIRST_TUPLE_SIZE_EMPTY(x) \
+ BOOST_PP_EXPAND(BOOST_PP_IS_SEQ_DETAIL_ASSERT_SIZE x) \
+/**/
+#
+# define BOOST_PP_IS_SEQ_DETAIL_ASSERT_FIRST_TUPLE_SIZE_FULL(x) \
+ BOOST_PP_VARIADIC_ELEM \
+ ( \
+ 0, \
+ BOOST_PP_EXPAND(BOOST_PP_IS_SEQ_DETAIL_ASSERT_SIZE_AFTER x) \
+ ) \
+/**/
+#
+# define BOOST_PP_IS_SEQ_DETAIL_GET_AFTER_FIRST_TUPLE(x) \
+ BOOST_PP_EXPAND(BOOST_PP_IS_SEQ_DETAIL_EMPTY x) \
+/**/
+#
+# define BOOST_PP_IS_SEQ_DETAIL_GEN_NOT_TUPLE(x) \
+ BOOST_PP_IS_SEQ_DETAIL_GEN_NOT_TUPLE_GET \
+ ( \
+ BOOST_PP_EXPAND(BOOST_PP_IS_SEQ_DETAIL_EMPTY x) \
+ ) \
+/**/
+#
+# define BOOST_PP_IS_SEQ_DETAIL_IS_AFTER_FIRST_TUPLE(x) \
+ BOOST_PP_IS_TUPLE_BEGIN \
+ ( \
+ BOOST_PP_EXPAND(BOOST_PP_IS_SEQ_DETAIL_EMPTY x) \
+ ) \
+/**/
+#
+# else
 # define BOOST_PP_IS_SEQ_DETAIL_ASSERT_FIRST_TUPLE_SIZE_EMPTY(x) \
     BOOST_PP_IS_SEQ_DETAIL_APPLY(BOOST_PP_IS_SEQ_DETAIL_ASSERT_SIZE,x) \
 /**/
@@ -162,6 +195,15 @@
       ) \
 /**/
 #
+# define BOOST_PP_IS_SEQ_DETAIL_IS_AFTER_FIRST_TUPLE(x) \
+ BOOST_PP_IS_TUPLE_BEGIN \
+ ( \
+ BOOST_PP_IS_SEQ_DETAIL_APPLY(BOOST_PP_IS_SEQ_DETAIL_EMPTY,x) \
+ ) \
+/**/
+#
+# endif
+#
 # define BOOST_PP_IS_SEQ_DETAIL_GEN_NOT_TUPLE_GET(x) \
     BOOST_PP_IIF \
       ( \
@@ -181,13 +223,6 @@
   BOOST_PP_IS_SEQ_DETAIL_APPLY_I(macro, args) \
 /**/
 #
-# define BOOST_PP_IS_SEQ_DETAIL_IS_AFTER_FIRST_TUPLE(x) \
- BOOST_PP_IS_TUPLE_BEGIN \
- ( \
- BOOST_PP_IS_SEQ_DETAIL_APPLY(BOOST_PP_IS_SEQ_DETAIL_EMPTY,x) \
- ) \
-/**/
-#
 # define BOOST_PP_IS_SEQ_DETAIL_GEN_RETURN_ASSERT(x) \
     BOOST_PP_IIF \
       ( \
@@ -197,9 +232,11 @@
       ) \
 /**/
 #
-# define BOOST_PP_IS_SEQ_DETAIL_EMPTY(...)
+# define BOOST_PP_IS_SEQ_DETAIL_EMPTY(...) BOOST_PP_IS_SEQ_DETAIL_EMPTY1(__VA_ARGS__)
+#
+# define BOOST_PP_IS_SEQ_DETAIL_EMPTY1(...)
 #
-# define BOOST_PP_IS_SEQ_DETAIL_EMPTY_F(x) \
+# define BOOST_PP_IS_SEQ_DETAIL_CHECK_RETURN_FAILURE(x) \
     BOOST_PP_ASSERT \
       ( \
       BOOST_PP_NOT \

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-25 08:28:29 EDT (Mon, 25 Jul 2011)
@@ -22,7 +22,6 @@
         [ compile comparison.cpp ]
         [ compile control.cpp ]
         [ compile debug.cpp : <variant>debug ]
-# [ compile debug_test.cpp : <variant>debug ]
         [ compile facilities.cpp ]
         [ compile iteration.cpp ]
         [ compile list.cpp ]

Modified: branches/pplib/v2/libs/preprocessor/test/debug.cxx
==============================================================================
--- branches/pplib/v2/libs/preprocessor/test/debug.cxx (original)
+++ branches/pplib/v2/libs/preprocessor/test/debug.cxx 2011-07-25 08:28:29 EDT (Mon, 25 Jul 2011)
@@ -30,9 +30,6 @@
 BOOST_PP_ASSERT_IS_ARRAY((6,(x,3,e,2,(4,(x,3,e,2)),$)))
 BOOST_PP_ASSERT_IS_LIST((4,(x,BOOST_PP_NIL)))
 BOOST_PP_ASSERT_IS_LIST(((3,6m,irj),(x,BOOST_PP_NIL)))
-
-#if !BOOST_PP_VARIADICS_MSVC
-
 BOOST_PP_ASSERT_IS_SEQ((x))
 BOOST_PP_ASSERT_IS_SEQ((x)(y))
 BOOST_PP_ASSERT_IS_SEQ((x)(y)(z)(2)(3)(4))
@@ -41,4 +38,3 @@
 BOOST_PP_ASSERT_IS_SEQ((x)(y)((x)(y)(z)(2)(3)(4))((1,2))(3)((4,(x,BOOST_PP_NIL))))
 
 # endif
-# 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