Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73541 - in sandbox/variadic_macro_data: boost/variadic_macro_data boost/variadic_macro_data/detail libs/variadic_macro_data/test
From: eldiener_at_[hidden]
Date: 2011-08-04 21:36:11


Author: eldiener
Date: 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
New Revision: 73541
URL: http://svn.boost.org/trac/boost/changeset/73541

Log:
Added assert_is_array and tests.
Added:
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array.hpp (contents, props changed)
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_common.hpp (contents, props changed)
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_native.hpp (contents, props changed)
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_pplib.hpp (contents, props changed)
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array.hpp (contents, props changed)
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array_common.hpp (contents, props changed)
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array_native.hpp (contents, props changed)
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array_pplib.hpp (contents, props changed)
   sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array.cpp (contents, props changed)
   sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail.cpp (contents, props changed)
   sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail2.cpp (contents, props changed)
   sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail3.cpp (contents, props changed)
   sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail4.cpp (contents, props changed)
Text files modified:
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd.hpp | 1 +
   sandbox/variadic_macro_data/libs/variadic_macro_data/test/Jamfile.v2 | 30 ++++++++++++++++++++++++++++++
   2 files changed, 31 insertions(+), 0 deletions(-)

Added: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array.hpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,17 @@
+#if !defined(VMD_DETAIL_ASSERT_IS_ARRAY_HPP)
+#define VMD_DETAIL_ASSERT_IS_ARRAY_HPP
+
+#include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
+
+#if BOOST_VMD_VARIADICS
+
+#if BOOST_VMD_PPLIB
+#include <boost/variadic_macro_data/detail/vmd_detail_assert_is_array_pplib.hpp>
+#else
+#include <boost/variadic_macro_data/detail/vmd_detail_assert_is_array_native.hpp>
+#endif /* BOOST_VMD_PPLIB */
+
+#include <boost/variadic_macro_data/detail/vmd_detail_assert_is_array_common.hpp>
+
+#endif /* BOOST_VMD_VARIADICS */
+#endif /* VMD_DETAIL_ASSERT_IS_ARRAY_HPP */

Added: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_common.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_common.hpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,107 @@
+#if !defined(VMD_DETAIL_ASSERT_IS_ARRAY_COMMON_HPP)
+#define VMD_DETAIL_ASSERT_IS_ARRAY_COMMON_HPP
+
+#include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
+
+#if BOOST_VMD_VARIADICS
+
+#if BOOST_VMD_ASSERT_DATA
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/variadic_macro_data/vmd_is_empty.hpp>
+
+#if BOOST_VMD_MSVC
+
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/debug/assert.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
+
+#define VMD_DETAIL_ASSERT_IS_ARRAY_VC_CHECK_RETURN_FAILURE(x) \
+ BOOST_PP_ASSERT \
+ ( \
+ x \
+ ) \
+ BOOST_PP_IIF \
+ ( \
+ x, \
+ BOOST_PP_EMPTY, \
+ VMD_DETAIL_ASSERT_IS_ARRAY_VC_GEN_ERROR_OUTPUT \
+ ) \
+ () \
+/**/
+
+#define VMD_DETAIL_ASSERT_IS_ARRAY_VC_GEN_ERROR_OUTPUT() \
+ typedef char BOOST_VMD_IS_ARRAY_ASSERT_ERROR[-1]; \
+/**/
+
+#endif /* BOOST_VMD_MSVC */
+
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM(x) BOOST_VMD_IS_EMPTY(BOOST_PP_CAT(VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_, x))
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_1
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_2
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_3
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_4
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_5
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_6
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_7
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_8
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_9
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_10
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_11
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_12
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_13
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_14
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_15
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_16
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_17
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_18
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_19
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_20
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_21
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_22
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_23
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_24
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_25
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_26
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_27
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_28
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_29
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_30
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_31
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_32
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_33
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_34
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_35
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_36
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_37
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_38
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_39
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_40
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_41
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_42
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_43
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_44
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_45
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_46
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_47
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_48
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_49
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_50
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_51
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_52
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_53
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_54
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_55
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_56
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_57
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_58
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_59
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_60
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_61
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_62
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_63
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_64
+
+#endif /* BOOST_VMD_ASSERT_DATA */
+#endif /* BOOST_VMD_VARIADICS */
+#endif /* VMD_DETAIL_ASSERT_ASSERT_IS_ARRAY_COMMON_HPP */

Added: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_native.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_native.hpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,66 @@
+#if !defined(VMD_DETAIL_ASSERT_IS_ARRAY_NATIVE_HPP)
+#define VMD_DETAIL_ASSERT_IS_ARRAY_NATIVE_HPP
+
+#include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
+
+#if BOOST_VMD_VARIADICS
+
+#if BOOST_VMD_ASSERT_DATA
+
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/variadic_macro_data/vmd_tuple.hpp>
+#include <boost/variadic_macro_data/vmd_assert_is_tuple.hpp>
+#include <boost/variadic_macro_data/detail/vmd_detail.hpp>
+
+#if BOOST_VMD_MSVC
+
+#define VMD_DETAIL_ASSERT_IS_ARRAY_VC_IMP(x) \
+ ( \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL(2,BOOST_VMD_PP_TUPLE_SIZE(x)), \
+ VMD_DETAIL_ASSERT_IS_ARRAY_CHECK_ARRAY_FORM, \
+ VMD_DETAIL_GEN_ZERO \
+ ) \
+ (x) \
+ ) \
+/**/
+
+#endif /* BOOST_VMD_MSVC */
+
+/*
+
+ Check if the first element of the tuple is numeric
+
+*/
+
+#define VMD_DETAIL_ASSERT_IS_ARRAY_CHECK_ARRAY_FORM(x) \
+ BOOST_PP_IIF \
+ ( \
+ VMD_DETAIL_ASSERT_IS_ARRAY_NUM(BOOST_VMD_PP_TUPLE_ELEM(0,x)), \
+ VMD_DETAIL_ASSERT_IS_ARRAY_CHECK_NUMERIC_MATCH, \
+ VMD_DETAIL_GEN_ZERO \
+ ) \
+ (x) \
+/**/
+
+/*
+
+ Finally check if the first element of the tuple is equal to the number of tuple elements of the second element
+
+*/
+
+#define VMD_DETAIL_ASSERT_IS_ARRAY_CHECK_NUMERIC_MATCH(x) \
+ BOOST_VMD_ASSERT_IS_TUPLE(BOOST_VMD_PP_TUPLE_ELEM(1,x)) \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL(BOOST_VMD_PP_TUPLE_ELEM(0,x),BOOST_VMD_PP_TUPLE_SIZE(BOOST_VMD_PP_TUPLE_ELEM(1,x))), \
+ 1, \
+ 0 \
+ ) \
+/**/
+
+#endif /* BOOST_VMD_ASSERT_DATA */
+#endif // BOOST_VMD_VARIADICS
+#endif // VMD_DETAIL_ASSERT_IS_ARRAY_NATIVE_HPP

Added: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_pplib.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_pplib.hpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,67 @@
+#if !defined(VMD_DETAIL_ASSERT_IS_ARRAY_PPLIB_HPP)
+#define VMD_DETAIL_ASSERT_IS_ARRAY_PPLIB_HPP
+
+#include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
+
+#if BOOST_VMD_VARIADICS
+
+#if BOOST_VMD_ASSERT_DATA
+
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/tuple/size.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/variadic_macro_data/vmd_assert_is_tuple.hpp>
+#include <boost/variadic_macro_data/detail/vmd_detail.hpp>
+
+#if BOOST_VMD_MSVC
+
+#define VMD_DETAIL_ASSERT_IS_ARRAY_VC_IMP(x) \
+ ( \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL(2,BOOST_PP_TUPLE_SIZE(x)), \
+ VMD_DETAIL_ASSERT_IS_ARRAY_CHECK_ARRAY_FORM, \
+ VMD_DETAIL_GEN_ZERO \
+ ) \
+ (x) \
+ ) \
+/**/
+
+#endif /* BOOST_VMD_MSVC */
+
+/*
+
+ Check if the first element of the tuple is numeric
+
+*/
+
+#define VMD_DETAIL_ASSERT_IS_ARRAY_CHECK_ARRAY_FORM(x) \
+ BOOST_PP_IIF \
+ ( \
+ VMD_DETAIL_ASSERT_IS_ARRAY_NUM(BOOST_PP_TUPLE_ELEM(0,x)), \
+ VMD_DETAIL_ASSERT_IS_ARRAY_CHECK_NUMERIC_MATCH, \
+ VMD_DETAIL_GEN_ZERO \
+ ) \
+ (x) \
+/**/
+
+/*
+
+ Finally check if the first element of the tuple is equal to the number of tuple elements of the second element
+
+*/
+
+#define VMD_DETAIL_ASSERT_IS_ARRAY_CHECK_NUMERIC_MATCH(x) \
+ BOOST_VMD_ASSERT_IS_TUPLE(BOOST_PP_TUPLE_ELEM(1,x)) \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL(BOOST_PP_TUPLE_ELEM(0,x),BOOST_PP_TUPLE_SIZE(BOOST_PP_TUPLE_ELEM(1,x))), \
+ 1, \
+ 0 \
+ ) \
+/**/
+
+#endif /* BOOST_VMD_ASSERT_DATA */
+#endif // BOOST_VMD_VARIADICS
+#endif // VMD_DETAIL_ASSERT_IS_ARRAY_PPLIB_HPP

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/vmd.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/vmd.hpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -12,6 +12,7 @@
 #include <boost/variadic_macro_data/vmd_is_tuple_begin.hpp>
 #include <boost/variadic_macro_data/vmd_remove_parens.hpp>
 #include <boost/variadic_macro_data/vmd_assert_is_tuple.hpp>
+#include <boost/variadic_macro_data/vmd_assert_is_array.hpp>
 
 #endif /* BOOST_VMD_VARIADICS */
 #endif /* VARIADIC_MACRO_DATA_HPP */

Added: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array.hpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,17 @@
+#if !defined(VMD_ASSERT_IS_ARRAY_HPP)
+#define VMD_ASSERT_IS_ARRAY_HPP
+
+#include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
+
+#if BOOST_VMD_VARIADICS
+
+#if BOOST_VMD_PPLIB
+#include <boost/variadic_macro_data/vmd_assert_is_array_pplib.hpp>
+#else
+#include <boost/variadic_macro_data/vmd_assert_is_array_native.hpp>
+#endif /* BOOST_VMD_PPLIB */
+
+#include <boost/variadic_macro_data/vmd_assert_is_array_common.hpp>
+
+#endif /* BOOST_VMD_VARIADICS */
+#endif /* VMD_ASSERT_IS_ARRAY_HPP */

Added: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array_common.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array_common.hpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,36 @@
+#if !defined(VMD_ASSERT_IS_ARRAY_COMMON_HPP)
+#define VMD_ASSERT_IS_ARRAY_COMMON_HPP
+
+#include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
+
+#if BOOST_VMD_VARIADICS
+
+#include <boost/variadic_macro_data/vmd_assert_is_tuple.hpp>
+#include <boost/variadic_macro_data/detail/vmd_detail_assert_is_array.hpp>
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+#if !BOOST_VMD_ASSERT_DATA
+
+#define BOOST_VMD_ASSERT_IS_ARRAY(x)
+
+#else
+
+#if BOOST_VMD_MSVC
+
+#define BOOST_VMD_ASSERT_IS_ARRAY(x) \
+ BOOST_VMD_ASSERT_IS_TUPLE(x) \
+ VMD_DETAIL_ASSERT_IS_ARRAY_VC_CHECK_RETURN_FAILURE VMD_DETAIL_ASSERT_IS_ARRAY_VC_IMP(x) \
+/**/
+
+#endif /* BOOST_VMD_MSVC */
+#endif /* BOOST_VMD_ASSERT_DATA */
+#endif /* BOOST_VMD_VARIADICS */
+#endif /* VMD_ASSERT_IS_ARRAY_COMMON_HPP */

Added: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array_native.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array_native.hpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,46 @@
+#if !defined(VMD_ASSERT_IS_ARRAY_NATIVE_HPP)
+#define VMD_ASSERT_IS_ARRAY_NATIVE_HPP
+
+#include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
+
+#if BOOST_VMD_VARIADICS
+
+#if BOOST_VMD_ASSERT_DATA
+
+#if !BOOST_VMD_MSVC
+
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/debug/assert.hpp>
+#include <boost/variadic_macro_data/vmd_assert_is_tuple.hpp>
+#include <boost/variadic_macro_data/vmd_tuple.hpp>
+#include <boost/variadic_macro_data/detail/vmd_detail_assert_is_array.hpp>
+#include <boost/variadic_macro_data/detail/vmd_detail.hpp>
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+#define BOOST_VMD_ASSERT_IS_ARRAY(x) \
+ BOOST_VMD_ASSERT_IS_TUPLE(x) \
+ BOOST_PP_ASSERT \
+ ( \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL(2,BOOST_VMD_PP_TUPLE_SIZE(x)), \
+ VMD_DETAIL_ASSERT_IS_ARRAY_CHECK_ARRAY_FORM, \
+ VMD_DETAIL_GEN_ZERO \
+ ) \
+ (x) \
+ ) \
+/**/
+
+#endif /* BOOST_VMD_MSVC */
+#endif /* BOOST_VMD_ASSERT_DATA */
+#endif /* BOOST_VMD_VARIADICS */
+#endif /* VMD_ASSERT_IS_ARRAY_NATIVE_HPP */

Added: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array_pplib.hpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_assert_is_array_pplib.hpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,46 @@
+#if !defined(VMD_ASSERT_IS_ARRAY_PPLIB_HPP)
+#define VMD_ASSERT_IS_ARRAY_PPLIB_HPP
+
+#include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
+
+#if BOOST_VMD_VARIADICS
+
+#if BOOST_VMD_ASSERT_DATA
+
+#if !BOOST_VMD_MSVC
+
+#include <boost/preprocessor/comparison/equal.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/debug/assert.hpp>
+#include <boost/preprocessor/tuple/size.hpp>
+#include <boost/variadic_macro_data/vmd_assert_is_tuple.hpp>
+#include <boost/variadic_macro_data/detail/vmd_detail_assert_is_array.hpp>
+#include <boost/variadic_macro_data/detail/vmd_detail.hpp>
+
+/*
+
+ The succeeding comments in this file are in doxygen format.
+
+*/
+
+/** \file
+*/
+
+#define BOOST_VMD_ASSERT_IS_ARRAY(x) \
+ BOOST_VMD_ASSERT_IS_TUPLE(x) \
+ BOOST_PP_ASSERT \
+ ( \
+ BOOST_PP_IIF \
+ ( \
+ BOOST_PP_EQUAL(2,BOOST_PP_TUPLE_SIZE(x)), \
+ VMD_DETAIL_ASSERT_IS_ARRAY_CHECK_ARRAY_FORM, \
+ VMD_DETAIL_GEN_ZERO \
+ ) \
+ (x) \
+ ) \
+/**/
+
+#endif /* BOOST_VMD_MSVC */
+#endif /* BOOST_VMD_ASSERT_DATA */
+#endif /* BOOST_VMD_VARIADICS */
+#endif /* VMD_ASSERT_IS_ARRAY_PPLIB_HPP */

Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/test/Jamfile.v2
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/test/Jamfile.v2 (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/test/Jamfile.v2 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -42,6 +42,16 @@
           <define>BOOST_VMD_ASSERT_DATA=1 ]
         [ compile-fail test_assert_is_tuple_fail4.cpp :
           <define>BOOST_VMD_ASSERT_DATA=1 ]
+ [ compile test_assert_is_array.cpp :
+ <define>BOOST_VMD_ASSERT_DATA=1 ]
+ [ compile-fail test_assert_is_array_fail.cpp :
+ <define>BOOST_VMD_ASSERT_DATA=1 ]
+ [ compile-fail test_assert_is_array_fail2.cpp :
+ <define>BOOST_VMD_ASSERT_DATA=1 ]
+ [ compile-fail test_assert_is_array_fail3.cpp :
+ <define>BOOST_VMD_ASSERT_DATA=1 ]
+ [ compile-fail test_assert_is_array_fail4.cpp :
+ <define>BOOST_VMD_ASSERT_DATA=1 ]
     ;
 
 test-suite variadic_macro_data_pplib
@@ -90,4 +100,24 @@
           <define>BOOST_VMD_ASSERT_DATA=1
           <define>BOOST_VMD_PPLIB=1 :
           test_assert_is_tuple_fail4_pplib ]
+ [ compile test_assert_is_array.cpp :
+ <define>BOOST_VMD_ASSERT_DATA=1
+ <define>BOOST_VMD_PPLIB=1 :
+ test_assert_is_array_pplib ]
+ [ compile-fail test_assert_is_array_fail.cpp :
+ <define>BOOST_VMD_ASSERT_DATA=1
+ <define>BOOST_VMD_PPLIB=1 :
+ test_assert_is_array_fail_pplib ]
+ [ compile-fail test_assert_is_array_fail2.cpp :
+ <define>BOOST_VMD_ASSERT_DATA=1
+ <define>BOOST_VMD_PPLIB=1 :
+ test_assert_is_array_fail2_pplib.cpp ]
+ [ compile-fail test_assert_is_array_fail3.cpp :
+ <define>BOOST_VMD_ASSERT_DATA=1
+ <define>BOOST_VMD_PPLIB=1 :
+ test_assert_is_array_fail3_pplib ]
+ [ compile-fail test_assert_is_array_fail4.cpp :
+ <define>BOOST_VMD_ASSERT_DATA=1
+ <define>BOOST_VMD_PPLIB=1 :
+ test_assert_is_array_fail4_pplib ]
     ;

Added: sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array.cpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array.cpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,20 @@
+#include <boost/variadic_macro_data/vmd_assert_is_array.hpp>
+// #include <boost/variadic_macro_data/vmd.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+#if BOOST_VMD_VARIADICS
+
+ #define AN_ARRAY (7,(5,7,f,x,%,$,U))
+
+ BOOST_VMD_ASSERT_IS_ARRAY((4,(x,3,e,2)))
+ BOOST_VMD_ASSERT_IS_ARRAY((6,(x,3,e,2,(4,(x,3,e,2)),$)))
+ BOOST_VMD_ASSERT_IS_ARRAY(AN_ARRAY)
+
+#endif
+
+ return boost::report_errors();
+
+ }

Added: sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail.cpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail.cpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,21 @@
+#include <boost/variadic_macro_data/vmd_assert_is_array.hpp>
+// #include <boost/variadic_macro_data/vmd.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+
+int main()
+ {
+
+#if BOOST_VMD_VARIADICS && BOOST_VMD_ASSERT_DATA
+
+ BOOST_VMD_ASSERT_IS_ARRAY((y,(x,3,e,2)))
+
+#else
+
+ typedef char BOOST_VMD_ASSERT_IS_TUPLE_ERROR[-1]; \
+
+#endif
+
+ return boost::report_errors();
+
+ }

Added: sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail2.cpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail2.cpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,20 @@
+#include <boost/variadic_macro_data/vmd_assert_is_array.hpp>
+// #include <boost/variadic_macro_data/vmd.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+#if BOOST_VMD_VARIADICS && BOOST_VMD_ASSERT_DATA
+
+ BOOST_VMD_ASSERT_IS_ARRAY((3,(x,3,e,2)))
+
+#else
+
+ typedef char BOOST_VMD_ASSERT_IS_TUPLE_ERROR[-1]; \
+
+#endif
+
+ return boost::report_errors();
+
+ }

Added: sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail3.cpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail3.cpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,20 @@
+#include <boost/variadic_macro_data/vmd_assert_is_array.hpp>
+// #include <boost/variadic_macro_data/vmd.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+#if BOOST_VMD_VARIADICS && BOOST_VMD_ASSERT_DATA
+
+ BOOST_VMD_ASSERT_IS_ARRAY(tree)
+
+#else
+
+ typedef char BOOST_VMD_ASSERT_IS_TUPLE_ERROR[-1]; \
+
+#endif
+
+ return boost::report_errors();
+
+ }

Added: sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail4.cpp
==============================================================================
--- (empty file)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_assert_is_array_fail4.cpp 2011-08-04 21:36:09 EDT (Thu, 04 Aug 2011)
@@ -0,0 +1,20 @@
+#include <boost/variadic_macro_data/vmd_assert_is_array.hpp>
+// #include <boost/variadic_macro_data/vmd.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+int main()
+ {
+
+#if BOOST_VMD_VARIADICS && BOOST_VMD_ASSERT_DATA
+
+ BOOST_VMD_ASSERT_IS_ARRAY((3,(3,5,6) xc))
+
+#else
+
+ typedef char BOOST_VMD_ASSERT_IS_TUPLE_ERROR[-1]; \
+
+#endif
+
+ return boost::report_errors();
+
+ }


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