|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73383 - branches/pplib/v2/boost/preprocessor/debug
From: eldiener_at_[hidden]
Date: 2011-07-26 14:46:58
Author: eldiener
Date: 2011-07-26 14:46:57 EDT (Tue, 26 Jul 2011)
New Revision: 73383
URL: http://svn.boost.org/trac/boost/changeset/73383
Log:
Updated check for assert macros for data with BOOST_PP_ASSERT_DATA user-defined macro.
Added:
branches/pplib/v2/boost/preprocessor/debug/assert_data_check.hpp (contents, props changed)
Text files modified:
branches/pplib/v2/boost/preprocessor/debug/assert_is_array.hpp | 29 +++++++++++++++--------------
branches/pplib/v2/boost/preprocessor/debug/assert_is_list.hpp | 4 +++-
branches/pplib/v2/boost/preprocessor/debug/assert_is_seq.hpp | 4 +++-
branches/pplib/v2/boost/preprocessor/debug/assert_is_tuple.hpp | 4 +++-
4 files changed, 24 insertions(+), 17 deletions(-)
Added: branches/pplib/v2/boost/preprocessor/debug/assert_data_check.hpp
==============================================================================
--- (empty file)
+++ branches/pplib/v2/boost/preprocessor/debug/assert_data_check.hpp 2011-07-26 14:46:57 EDT (Tue, 26 Jul 2011)
@@ -0,0 +1,26 @@
+# /* **************************************************************************
+# * *
+# * (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_DEBUG_ASSERT_DATA_CHECK_HPP
+# define BOOST_PREPROCESSOR_DEBUG_ASSERT_DATA_CHECK_HPP
+#
+# if BOOST_PP_VARIADICS
+#
+# if !defined(BOOST_PP_ASSERT_DATA)
+# if defined(NDEBUG)
+# define BOOST_PP_ASSERT_DATA 0
+# else
+# define BOOST_PP_ASSERT_DATA 1
+# endif
+# endif
+#
+# endif /* BOOST_PP_VARIADICS */
+# endif /* BOOST_PREPROCESSOR_DEBUG_ASSERT_DATA_CHECK_HPP */
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 14:46:57 EDT (Tue, 26 Jul 2011)
@@ -13,22 +13,29 @@
# define BOOST_PREPROCESSOR_DEBUG_ASSERT_IS_ARRAY_HPP
#
# include <boost/preprocessor/config/config.hpp>
-# include <boost/preprocessor/comparison/equal.hpp>
-# include <boost/preprocessor/control/iif.hpp>
-# include <boost/preprocessor/debug/assert.hpp>
-# include <boost/preprocessor/debug/assert_is_tuple.hpp>
-# include <boost/preprocessor/logical/bitand.hpp>
-# include <boost/preprocessor/tuple/elem.hpp>
-# include <boost/preprocessor/tuple/size.hpp>
#
# /* BOOST_PP_ASSERT_IS_ARRAY */
#
# if BOOST_PP_VARIADICS
-# if defined(NDEBUG)
+#
+# include <boost/preprocessor/debug/assert_data_check.hpp>
+#
+# if !BOOST_PP_ASSERT_DATA
+#
# define BOOST_PP_ASSERT_IS_ARRAY(x) \
/**/
+#
# else
#
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/comparison/equal.hpp>
+# include <boost/preprocessor/control/iif.hpp>
+# include <boost/preprocessor/debug/assert.hpp>
+# include <boost/preprocessor/debug/assert_is_tuple.hpp>
+# include <boost/preprocessor/facilities/is_empty.hpp>
+# include <boost/preprocessor/tuple/elem.hpp>
+# include <boost/preprocessor/tuple/size.hpp>
+#
# if BOOST_PP_VARIADICS_MSVC
#
# include <boost/preprocessor/facilities/empty.hpp>
@@ -88,12 +95,6 @@
/*
- Check if the array is a two element tuple
-
-*/
-
-/*
-
Check if the first element of the tuple is numeric
*/
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 14:46:57 EDT (Tue, 26 Jul 2011)
@@ -18,7 +18,9 @@
#
# if BOOST_PP_VARIADICS
#
-# if defined(NDEBUG)
+# include <boost/preprocessor/debug/assert_data_check.hpp>
+#
+# if !BOOST_PP_ASSERT_DATA
#
# define BOOST_PP_ASSERT_IS_LIST(x)
#
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 14:46:57 EDT (Tue, 26 Jul 2011)
@@ -18,7 +18,9 @@
#
# if BOOST_PP_VARIADICS
#
-# if defined(NDEBUG)
+# include <boost/preprocessor/debug/assert_data_check.hpp>
+#
+# if !BOOST_PP_ASSERT_DATA
#
# 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 14:46:57 EDT (Tue, 26 Jul 2011)
@@ -18,7 +18,9 @@
#
# if BOOST_PP_VARIADICS
#
-# if defined(NDEBUG)
+# include <boost/preprocessor/debug/assert_data_check.hpp>
+#
+# if !BOOST_PP_ASSERT_DATA
#
# define BOOST_PP_ASSERT_IS_TUPLE(x)
#
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