$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r73305 - in branches/pplib/v2: boost/preprocessor/debug boost/preprocessor/facilities libs/preprocessor/test
From: eldiener_at_[hidden]
Date: 2011-07-22 17:11:06
Author: eldiener
Date: 2011-07-22 17:11:05 EDT (Fri, 22 Jul 2011)
New Revision: 73305
URL: http://svn.boost.org/trac/boost/changeset/73305
Log:
Updated macros.
Text files modified: 
   branches/pplib/v2/boost/preprocessor/debug/assert_is_seq.hpp |    82 +++++++++++++++------------------------ 
   branches/pplib/v2/boost/preprocessor/facilities/is_empty.hpp |     3                                         
   branches/pplib/v2/libs/preprocessor/test/Jamfile.v2          |    65 +++++++++++++++----------------         
   branches/pplib/v2/libs/preprocessor/test/debug.cxx           |     8 +++                                     
   4 files changed, 73 insertions(+), 85 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-22 17:11:05 EDT (Fri, 22 Jul 2011)
@@ -32,31 +32,29 @@
 # else
 #
 # define BOOST_PP_ASSERT_IS_SEQ(x) \
-    BOOST_PP_IS_SEQ_DETAIL_GEN_EMPTY \
+    BOOST_PP_IIF \
       ( \
-      BOOST_PP_WHILE \
-        ( \
-        BOOST_PP_IS_SEQ_DETAIL_PRED, \
-        BOOST_PP_IS_SEQ_DETAIL_OP, \
-        x \
-        ) \
+      BOOST_PP_IS_EMPTY(x), \
+      BOOST_PP_IS_SEQ_DETAIL_GEN_RETURN_ASSERT_ERROR, \
+      BOOST_PP_IS_SEQ_DETAIL_WHILE \
       ) \
+    (x) \
 /**/
 #
-# define BOOST_PP_IS_SEQ_DETAIL_GEN_EMPTY(x) \
-    BOOST_PP_IS_SEQ_DETAIL_GEN_EMPTY_I(x) \
+# define BOOST_PP_IS_SEQ_DETAIL_WHILE(x) \
+    BOOST_PP_WHILE \
+      ( \
+      BOOST_PP_IS_SEQ_DETAIL_PRED, \
+      BOOST_PP_IS_SEQ_DETAIL_OP, \
+      x \
+      ) \
 /**/
 #
-# define BOOST_PP_IS_SEQ_DETAIL_GEN_EMPTY_I(x)
-#
 # define BOOST_PP_IS_SEQ_DETAIL_PRED(d,state) \
-    BOOST_PP_IIF \
+    BOOST_PP_NOT \
       ( \
-      BOOST_PP_IS_TUPLE_BEGIN(state), \
-      BOOST_PP_IS_SEQ_DETAIL_GEN_ONE, \
-      BOOST_PP_IS_SEQ_DETAIL_NOT_NIL \
+      BOOST_PP_IS_EMPTY(state) \
       ) \
-    (state) \
 /**/
 #
 # define BOOST_PP_IS_SEQ_DETAIL_OP(d,state) \
@@ -88,17 +86,16 @@
         1 \
         ) \
       ) \
-    1 \
 /**/
 #
 # define BOOST_PP_IS_SEQ_DETAIL_ASSERT_FIRST_TUPLE_SIZE(x) \
     BOOST_PP_IS_SEQ_DETAIL_EMPTY_E \
       ( \
-      BOOST_PP_IS_SEQ_DETAIL_ASSERT_SIZE x \
+      BOOST_PP_IS_SEQ_DETAIL_APPLY(BOOST_PP_IS_SEQ_DETAIL_ASSERT_SIZE,x) \
       ) \
 /**/
 # define BOOST_PP_IS_SEQ_DETAIL_GET_AFTER_FIRST_TUPLE(x) \
-    BOOST_PP_IS_SEQ_DETAIL_EMPTY x \
+    BOOST_PP_IS_SEQ_DETAIL_APPLY(BOOST_PP_IS_SEQ_DETAIL_EMPTY,x) \
 /**/
 #
 # define BOOST_PP_IS_SEQ_DETAIL_GEN_NOT_TUPLE(x) \
@@ -106,57 +103,42 @@
       ( \
       BOOST_PP_IS_EMPTY \
         ( \
-        BOOST_PP_IS_SEQ_DETAIL_EMPTY x \
+        BOOST_PP_IS_SEQ_DETAIL_APPLY(BOOST_PP_IS_SEQ_DETAIL_EMPTY,x) \
         ) \
       ) \
-    BOOST_PP_IS_SEQ_DETAIL_NIL \
+/**/
+#
+#define BOOST_PP_IS_SEQ_DETAIL_APPLY_I(macro, args) \
+  macro args \
+/**/
+#define BOOST_PP_IS_SEQ_DETAIL_APPLY(macro, args) \
+  BOOST_PP_IS_SEQ_DETAIL_APPLY_I(macro, args) \
 /**/
 #
 # define BOOST_PP_IS_SEQ_DETAIL_IS_AFTER_FIRST_TUPLE(x) \
     BOOST_PP_IS_SEQ_DETAIL_ASSERT_FIRST_TUPLE_SIZE(x) \
     BOOST_PP_IS_TUPLE_BEGIN \
       ( \
-      BOOST_PP_IS_SEQ_DETAIL_EMPTY x \
+      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_ASSERT(0) \
-    BOOST_PP_IS_SEQ_DETAIL_NIL \
-/**/
-# define BOOST_PP_IS_SEQ_DETAIL_GEN_RETURN(x) \
-    BOOST_PP_IS_SEQ_DETAIL_NIL \
-/**/
-#
-# define BOOST_PP_IS_SEQ_DETAIL_NOT_NIL(x) \
-    BOOST_PP_NOT \
+    BOOST_PP_ASSERT \
       ( \
-      BOOST_PP_IS_SEQ_DETAIL_IS_NIL(x) \
+      BOOST_PP_IS_EMPTY(x) \
       ) \
 /**/
 #
-# define BOOST_PP_IS_SEQ_DETAIL_GEN_ONE(x) 1
-#
-# define BOOST_PP_IS_SEQ_DETAIL_EMPTY(...)
-#
-# define BOOST_PP_IS_SEQ_DETAIL_EMPTY_E(...) \
-    BOOST_PP_IS_SEQ_DETAIL_EMPTY_1(__VA_ARGS__) \
+# define BOOST_PP_IS_SEQ_DETAIL_GEN_RETURN_ASSERT_ERROR(x) \
+    BOOST_PP_ASSERT(0) \
 /**/
 #
-# define BOOST_PP_IS_SEQ_DETAIL_EMPTY_1(...)
+# define BOOST_PP_IS_SEQ_DETAIL_EMPTY(...)
 #
-# define BOOST_PP_IS_SEQ_DETAIL_IS_NIL(x) \
-    BOOST_PP_IS_EMPTY \
-      ( \
-      BOOST_PP_CAT \
-        ( \
-        BOOST_PP_IS_SEQ_DETAIL_HELPER_, \
-        x \
-        ) \
-      ) \
-/**/
+# define BOOST_PP_IS_SEQ_DETAIL_EMPTY_E(x) BOOST_PP_IS_SEQ_DETAIL_EMPTY_E1(x)
 #
-# define BOOST_PP_IS_SEQ_DETAIL_HELPER_BOOST_PP_IS_SEQ_DETAIL_NIL
+# define BOOST_PP_IS_SEQ_DETAIL_EMPTY_E1(x)
 #
 # endif /* NDEBUG */
 # endif /* BOOST_PP_VARIADICS */
Modified: branches/pplib/v2/boost/preprocessor/facilities/is_empty.hpp
==============================================================================
--- branches/pplib/v2/boost/preprocessor/facilities/is_empty.hpp	(original)
+++ branches/pplib/v2/boost/preprocessor/facilities/is_empty.hpp	2011-07-22 17:11:05 EDT (Fri, 22 Jul 2011)
@@ -7,6 +7,8 @@
 #  *                                                                          *
 #  ************************************************************************** */
 #
+# /* Revised by Edward Diener (2011) */
+#
 # /* See http://www.boost.org for most recent version. */
 #
 # ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP
@@ -21,7 +23,6 @@
 # if BOOST_PP_VARIADICS_MSVC
 #
 # include <boost/preprocessor/arithmetic/dec.hpp>
-# include <boost/preprocessor/control/if.hpp>
 # include <boost/preprocessor/variadic/size.hpp>
 #
 # define BOOST_PP_IS_EMPTY_DETAIL_IS_TUPLE_BEGIN(x) \
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-22 17:11:05 EDT (Fri, 22 Jul 2011)
@@ -22,7 +22,6 @@
         [ compile comparison.cpp ]
         [ compile control.cpp ]
         [ compile debug.cpp ]
-        [ compile debug_test.cpp ]
         [ compile facilities.cpp ]
         [ compile iteration.cpp ]
         [ compile list.cpp ]
@@ -55,100 +54,100 @@
 
 test-suite preprocessor_cpp_dbg
    :   
-        [ compile-fail debug_fail_tuple.c 
+        [ compile-fail debug_fail_tuple.cpp
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_tuple_cpp
         ]
-        [ compile-fail debug_fail_array.c 
+        [ compile-fail debug_fail_array.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_array_cpp
         ]
-        [ compile-fail debug_fail_list.c 
+        [ compile-fail debug_fail_list.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_list_cpp
         ]
-        [ compile-fail debug_fail_seq.c 
+        [ compile-fail debug_fail_seq.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_seq_cpp
         ]
-        [ compile-fail debug_fail_tuple_2.c 
+        [ compile-fail debug_fail_tuple_2.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_tuple_2_cpp
         ]
-        [ compile-fail debug_fail_array_2.c 
+        [ compile-fail debug_fail_array_2.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_array_2_cpp
         ]
-        [ compile-fail debug_fail_list_2.c 
+        [ compile-fail debug_fail_list_2.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_list_2_cpp
         ]
-        [ compile-fail debug_fail_seq_2.c 
+        [ compile-fail debug_fail_seq_2.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_seq_2_cpp
         ]
-        [ compile-fail debug_fail_tuple_3.c 
+        [ compile-fail debug_fail_tuple_3.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_tuple_3_cpp
         ]
-        [ compile-fail debug_fail_array_3.c 
+        [ compile-fail debug_fail_array_3.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_array_3_cpp
         ]
-        [ compile-fail debug_fail_list_3.c 
+        [ compile-fail debug_fail_list_3.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_list_3_cpp
         ]
-        [ compile-fail debug_fail_seq_3.c 
+        [ compile-fail debug_fail_seq_3.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_seq_3_cpp
         ]
-        [ compile-fail debug_fail_tuple_4.c 
+        [ compile-fail debug_fail_tuple_4.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_tuple_4_cpp
         ]
-        [ compile-fail debug_fail_array_4.c 
+        [ compile-fail debug_fail_array_4.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_array_4_cpp
         ]
-        [ compile-fail debug_fail_list_4.c 
+        [ compile-fail debug_fail_list_4.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_list_4_cpp
         ]
-        [ compile-fail debug_fail_seq_4.c 
+        [ compile-fail debug_fail_seq_4.cpp 
           : <variant>debug
             <define>BOOST_PP_VARIADICS=1
-            <cflags>-std=c++0x
+            <cxxflags>-std=c++0x
           : debug_fail_seq_4_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-22 17:11:05 EDT (Fri, 22 Jul 2011)
@@ -22,7 +22,7 @@
 # line BOOST_PP_LINE(100, __FILE__)
 BEGIN __LINE__ == 100 END
 
-# if BOOST_PP_VARIADICS && !BOOST_PP_VARIADICS_MSVC
+# if BOOST_PP_VARIADICS
 
 BOOST_PP_ASSERT_IS_TUPLE((t,3,e,2))
 BOOST_PP_ASSERT_IS_TUPLE(((y,s,w),3,e,2))
@@ -30,9 +30,15 @@
 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)(z)(2)(3)(4))
 BOOST_PP_ASSERT_IS_SEQ((x)(y)(z)((1,2))(3)(4))
 BOOST_PP_ASSERT_IS_SEQ((x)(y)(z)((1,2))(3)((4,(x,BOOST_PP_NIL))))
 BOOST_PP_ASSERT_IS_SEQ((x)(y)((x)(y)(z)(2)(3)(4))((1,2))(3)((4,(x,BOOST_PP_NIL))))
 
+# endif
+
 # endif
\ No newline at end of file