$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r73380 - in branches/pplib/v2: boost/preprocessor/debug libs/preprocessor/test
From: eldiener_at_[hidden]
Date: 2011-07-26 12:39:49
Author: eldiener
Date: 2011-07-26 12:39:48 EDT (Tue, 26 Jul 2011)
New Revision: 73380
URL: http://svn.boost.org/trac/boost/changeset/73380
Log:
Updated assert macros
Text files modified: 
   branches/pplib/v2/boost/preprocessor/debug/assert_is_array.hpp |    56 +++++++++++++++++++++++++++++++++++-----
   branches/pplib/v2/boost/preprocessor/debug/assert_is_list.hpp  |    20 ++++++++++----                          
   branches/pplib/v2/boost/preprocessor/debug/assert_is_seq.hpp   |    24 ++++++++++-------                       
   branches/pplib/v2/boost/preprocessor/debug/assert_is_tuple.hpp |    49 ++++++++++++++++++++++++++++++++--      
   branches/pplib/v2/libs/preprocessor/test/Jamfile.v2            |    12 --------                                
   5 files changed, 123 insertions(+), 38 deletions(-)
Modified: branches/pplib/v2/boost/preprocessor/debug/assert_is_array.hpp
==============================================================================
--- branches/pplib/v2/boost/preprocessor/debug/assert_is_array.hpp	(original)
+++ branches/pplib/v2/boost/preprocessor/debug/assert_is_array.hpp	2011-07-26 12:39:48 EDT (Tue, 26 Jul 2011)
@@ -28,13 +28,48 @@
 # define BOOST_PP_ASSERT_IS_ARRAY(x) \
 /**/
 # else
-
-/*
-
-  Check if the array is a two element tuple
-
-*/
-
+#
+# if BOOST_PP_VARIADICS_MSVC
+#
+# include <boost/preprocessor/facilities/empty.hpp>
+#
+# define BOOST_PP_ASSERT_IS_ARRAY(x) \
+    BOOST_PP_ASSERT_IS_TUPLE(x) \
+    BOOST_PP_ASSERT_IS_ARRAY_DETAIL_VC_CHECK_RETURN_FAILURE BOOST_PP_ASSERT_IS_ARRAY_DETAIL_VC_IMP(x) \
+/**/
+#
+# define BOOST_PP_ASSERT_IS_ARRAY_DETAIL_VC_IMP(x) \
+    ( \
+    BOOST_PP_IIF \
+      ( \
+      BOOST_PP_EQUAL(2,BOOST_PP_TUPLE_SIZE(x)), \
+      BOOST_PP_IS_ARRAY_DETAIL_CHECK_ARRAY_FORM, \
+      BOOST_PP_IS_ARRAY_DETAIL_GEN_ZERO \
+      ) \
+    (x) \
+    ) \
+/**/
+#
+# define BOOST_PP_ASSERT_IS_ARRAY_DETAIL_VC_CHECK_RETURN_FAILURE(x) \
+    BOOST_PP_ASSERT \
+      ( \
+      x \
+      ) \
+    BOOST_PP_IIF \
+      ( \
+      x, \
+      BOOST_PP_EMPTY, \
+      BOOST_PP_IS_ARRAY_DETAIL_VC_GEN_ERROR_OUTPUT \
+      ) \
+    () \
+/**/
+#
+# define BOOST_PP_IS_ARRAY_DETAIL_VC_GEN_ERROR_OUTPUT() \
+    typedef char BOOST_PP_IS_ARRAY_DETAIL_CASSERT_ERROR[-1]; \
+/**/
+#
+# else
+#
 # define BOOST_PP_ASSERT_IS_ARRAY(x) \
     BOOST_PP_ASSERT_IS_TUPLE(x) \
     BOOST_PP_ASSERT \
@@ -49,6 +84,13 @@
       ) \
 /**/
 #
+# endif
+
+/*
+
+  Check if the array is a two element tuple
+
+*/
 
 /*
 
Modified: branches/pplib/v2/boost/preprocessor/debug/assert_is_list.hpp
==============================================================================
--- branches/pplib/v2/boost/preprocessor/debug/assert_is_list.hpp	(original)
+++ branches/pplib/v2/boost/preprocessor/debug/assert_is_list.hpp	2011-07-26 12:39:48 EDT (Tue, 26 Jul 2011)
@@ -13,6 +13,17 @@
 # define BOOST_PREPROCESSOR_DEBUG_ASSERT_IS_LIST_HPP
 #
 # include <boost/preprocessor/config/config.hpp>
+#
+# /* BOOST_PP_ASSERT_IS_LIST */
+#
+# if BOOST_PP_VARIADICS
+#
+# if defined(NDEBUG)
+#
+# define BOOST_PP_ASSERT_IS_LIST(x)
+#
+# else
+#
 # include <boost/preprocessor/cat.hpp>
 # include <boost/preprocessor/comparison/equal.hpp>
 # include <boost/preprocessor/control/iif.hpp>
@@ -26,14 +37,11 @@
 # include <boost/preprocessor/tuple/elem.hpp>
 # include <boost/preprocessor/tuple/size.hpp>
 #
-# /* BOOST_PP_ASSERT_IS_LIST */
+# if BOOST_PP_VARIADICS_MSVC
 #
-# if BOOST_PP_VARIADICS
-# if defined(NDEBUG)
-# define BOOST_PP_ASSERT_IS_LIST(x) \
-/**/
+# include <boost/preprocessor/facilities/empty.hpp>
 #
-# else
+# endif
 #
 # define BOOST_PP_ASSERT_IS_LIST(x) \
     BOOST_PP_IS_LIST_DETAIL_CHECK_RETURN_FAILURE \
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-26 12:39:48 EDT (Tue, 26 Jul 2011)
@@ -13,29 +13,33 @@
 # define BOOST_PREPROCESSOR_DEBUG_ASSERT_IS_SEQ_HPP
 #
 # include <boost/preprocessor/config/config.hpp>
+#   
+# /* BOOST_PP_ASSERT_IS_SEQ */
+#
+# if BOOST_PP_VARIADICS
+#
+# if defined(NDEBUG)
+#
+# define BOOST_PP_ASSERT_IS_SEQ(x)
+#
+# else
+#
 # include <boost/preprocessor/cat.hpp>
 # include <boost/preprocessor/comparison/equal.hpp>
-# include <boost/preprocessor/control/expr_iif.hpp>
 # 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>
 # include <boost/preprocessor/variadic/size.hpp>
 # include <boost/preprocessor/variadic/elem.hpp>
-#   
-# /* BOOST_PP_ASSERT_IS_SEQ */
-#
-# if BOOST_PP_VARIADICS
-# if defined(NDEBUG)
-# define BOOST_PP_ASSERT_IS_SEQ(x)
-#
-# else
 #
 # if BOOST_PP_VARIADICS_MSVC
+#
 # include <boost/preprocessor/facilities/empty.hpp>
+# include <boost/preprocessor/facilities/expand.hpp>
+#
 # endif
 #
 # define BOOST_PP_ASSERT_IS_SEQ(x) \
Modified: branches/pplib/v2/boost/preprocessor/debug/assert_is_tuple.hpp
==============================================================================
--- branches/pplib/v2/boost/preprocessor/debug/assert_is_tuple.hpp	(original)
+++ branches/pplib/v2/boost/preprocessor/debug/assert_is_tuple.hpp	2011-07-26 12:39:48 EDT (Tue, 26 Jul 2011)
@@ -13,18 +13,59 @@
 # define BOOST_PREPROCESSOR_DEBUG_ASSERT_IS_TUPLE_HPP
 #
 # include <boost/preprocessor/config/config.hpp>
+#
+# /* BOOST_PP_ASSERT_IS_TUPLE */
+#
+# if BOOST_PP_VARIADICS
+#
+# if defined(NDEBUG)
+#
+# define BOOST_PP_ASSERT_IS_TUPLE(x)
+#
+# else
+#
 # include <boost/preprocessor/control/iif.hpp>
 # include <boost/preprocessor/debug/assert.hpp>
 # include <boost/preprocessor/facilities/is_empty.hpp>
 # include <boost/preprocessor/facilities/is_tuple_begin.hpp>
 #
-# /* BOOST_PP_ASSERT_IS_TUPLE */
+# if BOOST_PP_VARIADICS_MSVC
+#
+# include <boost/preprocessor/facilities/empty.hpp>
 #
-# if BOOST_PP_VARIADICS
-# if defined(NDEBUG)
 # define BOOST_PP_ASSERT_IS_TUPLE(x) \
+    BOOST_PP_IS_TUPLE_DETAIL_VC_CHECK_RETURN_FAILURE \
+      ( \
+      BOOST_PP_IIF \
+        ( \
+        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_VC_CHECK_RETURN_FAILURE(x) \
+    BOOST_PP_ASSERT \
+      ( \
+      x \
+      ) \
+    BOOST_PP_IIF \
+      ( \
+      x, \
+      BOOST_PP_EMPTY, \
+      BOOST_PP_IS_TUPLE_DETAIL_VC_GEN_ERROR_OUTPUT \
+      ) \
+    () \
+/**/
+#
+# define BOOST_PP_IS_TUPLE_DETAIL_VC_GEN_ERROR_OUTPUT() \
+    typedef char BOOST_PP_IS_TUPLE_DETAIL_CASSERT_ERROR[-1]; \
+/**/
+#
 # else
+#
 # define BOOST_PP_ASSERT_IS_TUPLE(x) \
     BOOST_PP_ASSERT \
       ( \
@@ -38,6 +79,8 @@
       ) \
 /**/
 #
+# endif
+#
 # define BOOST_PP_IS_TUPLE_DETAIL_IS_NOT_AFTER(x) \
     BOOST_PP_IS_EMPTY(BOOST_PP_IS_TUPLE_DETAIL_EXPAND_AFTER 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-26 12:39:48 EDT (Tue, 26 Jul 2011)
@@ -152,12 +152,6 @@
         ]
    ;
 
-test-suite preprocessor_cpp_dbg
-   :
-   :
-   <toolset>msvc
-   ;
-
 test-suite preprocessor_c
    :   
         [ compile arithmetic.c 
@@ -378,9 +372,3 @@
           : debug_fail_seq_4_c
         ]
    ;
-
-test-suite preprocessor_c_dbg 
-   :
-   :
-   <toolset>msvc
-   ;