Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73731 - in sandbox/variadic_macro_data: boost/variadic_macro_data boost/variadic_macro_data/detail libs/variadic_macro_data/doc libs/variadic_macro_data/test
From: eldiener_at_[hidden]
Date: 2011-08-14 08:03:21


Author: eldiener
Date: 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
New Revision: 73731
URL: http://svn.boost.org/trac/boost/changeset/73731

Log:
Updated is_begin_parens.
Removed:
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens_native.hpp
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens_pplib.hpp
Text files modified:
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_common.hpp | 4 ++--
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_list_common.hpp | 5 +++--
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_seq_common.hpp | 9 +++++----
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_tuple_common.hpp | 3 ++-
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_data_native.hpp | 9 ---------
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_is_begin_parens_common.hpp | 20 ++++++++++++++++++++
   sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_is_empty_common.hpp | 3 ++-
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_Is_empty_common.hpp | 19 ++++++++++++-------
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_Is_empty_pplib.hpp | 25 +++++++++++++++----------
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens.hpp | 6 ------
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens_common.hpp | 21 ++++++++++++++++++++-
   sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_empty_native.hpp | 25 +++++++++++++++----------
   sandbox/variadic_macro_data/libs/variadic_macro_data/doc/vmd_detail.qbk | 6 ++----
   sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_is_begin_parens.cpp | 2 ++
   sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_is_empty.cpp | 11 ++++++-----
   15 files changed, 106 insertions(+), 62 deletions(-)

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_common.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_common.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_array_common.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -7,12 +7,12 @@
 
 #include <boost/preprocessor/cat.hpp>
 #include <boost/variadic_macro_data/vmd_is_empty.hpp>
+#include <boost/preprocessor/facilities/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 \
@@ -36,7 +36,7 @@
 
 #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(x) BOOST_VMD_IS_EMPTY(BOOST_PP_CAT(VMD_DETAIL_ASSERT_IS_ARRAY_NUM_HELPER_, x) BOOST_PP_EMPTY())
 #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

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_list_common.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_list_common.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_list_common.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -8,6 +8,7 @@
 #include <boost/preprocessor/cat.hpp>
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/debug/assert.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/preprocessor/logical/bitor.hpp>
 #include <boost/preprocessor/logical/not.hpp>
 #include <boost/variadic_macro_data/vmd_is_empty.hpp>
@@ -114,7 +115,7 @@
         ( \
         VMD_DETAIL_ASSERT_IS_LIST_NIL_HELPER_, \
         x \
- ) \
+ ) BOOST_PP_EMPTY() \
       ) \
 /**/
 
@@ -123,7 +124,7 @@
 #define VMD_DETAIL_ASSERT_IS_LIST_IS_FAILURE(x) \
     BOOST_VMD_IS_EMPTY \
       ( \
- BOOST_PP_CAT(VMD_DETAIL_ASSERT_IS_LIST_FHELPER_,x) \
+ BOOST_PP_CAT(VMD_DETAIL_ASSERT_IS_LIST_FHELPER_,x) BOOST_PP_EMPTY() \
       ) \
 /**/
 

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_seq_common.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_seq_common.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_seq_common.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -8,6 +8,7 @@
 #include <boost/preprocessor/cat.hpp>
 #include <boost/preprocessor/control/iif.hpp>
 #include <boost/preprocessor/debug/assert.hpp>
+#include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/preprocessor/facilities/expand.hpp>
 #include <boost/preprocessor/logical/not.hpp>
 #include <boost/variadic_macro_data/vmd_is_empty.hpp>
@@ -79,7 +80,7 @@
       ( \
       BOOST_VMD_IS_EMPTY \
         ( \
- VMD_DETAIL_ASSERT_IS_SEQ_GET_AFTER_FIRST_TUPLE(x) \
+ VMD_DETAIL_ASSERT_IS_SEQ_GET_AFTER_FIRST_TUPLE(x) BOOST_PP_EMPTY() \
         ), \
       VMD_DETAIL_ASSERT_IS_SEQ_ASSERT_FIRST_TUPLE_SIZE_EMPTY, \
       VMD_DETAIL_ASSERT_IS_SEQ_ASSERT_FIRST_TUPLE_SIZE_FULL \
@@ -171,7 +172,7 @@
       ( \
       BOOST_VMD_IS_EMPTY \
         ( \
- x \
+ x BOOST_PP_EMPTY() \
         ), \
       BOOST_VMD_IS_SEQ_SUCCESS, \
       x \
@@ -196,13 +197,13 @@
 #define VMD_DETAIL_ASSERT_IS_SEQ_IS_SUCCESS(x) \
     BOOST_VMD_IS_EMPTY \
       ( \
- BOOST_PP_CAT(VMD_DETAIL_ASSERT_IS_SEQ_SHELPER_,x) \
+ BOOST_PP_CAT(VMD_DETAIL_ASSERT_IS_SEQ_SHELPER_,x) BOOST_PP_EMPTY() \
       ) \
 /**/
 #define VMD_DETAIL_ASSERT_IS_SEQ_IS_FAILURE(x) \
     BOOST_VMD_IS_EMPTY \
       ( \
- BOOST_PP_CAT(VMD_DETAIL_ASSERT_IS_SEQ_FHELPER_,x) \
+ BOOST_PP_CAT(VMD_DETAIL_ASSERT_IS_SEQ_FHELPER_,x) BOOST_PP_EMPTY() \
       ) \
 /**/
 #define VMD_DETAIL_ASSERT_IS_SEQ_SHELPER_BOOST_VMD_IS_SEQ_SUCCESS

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_tuple_common.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_tuple_common.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_assert_is_tuple_common.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -5,6 +5,7 @@
 
 #if BOOST_VMD_VARIADICS && BOOST_VMD_ASSERT_DATA
 
+#include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/variadic_macro_data/vmd_is_empty.hpp>
 
 #if BOOST_VMD_MSVC
@@ -36,7 +37,7 @@
 #endif /* BOOST_VMD_MSVC */
 
 #define VMD_DETAIL_ASSERT_IS_TUPLE_IS_NOT_AFTER(x) \
- BOOST_VMD_IS_EMPTY(VMD_DETAIL_ASSERT_IS_TUPLE_EXPAND_AFTER x) \
+ BOOST_VMD_IS_EMPTY(VMD_DETAIL_ASSERT_IS_TUPLE_EXPAND_AFTER x BOOST_PP_EMPTY()) \
 /**/
 
 #define VMD_DETAIL_ASSERT_IS_TUPLE_EXPAND_AFTER(...) \

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_data_native.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_data_native.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_data_native.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -18,18 +18,9 @@
 
 #if BOOST_VMD_MSVC
 #include <boost/preprocessor/facilities/empty.hpp>
-#if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
 #define VMD_DETAIL_VD_CAT(a, b) VMD_DETAIL_VD_CAT_I(a, b)
-#else
-#define VMD_DETAIL_VD_CAT(a, b) VMD_DETAIL_VD_CAT_OO((a, b))
-#define VMD_DETAIL_VD_CAT_OO(par) VMD_DETAIL_VD_CAT_I ## par
-#endif
-#if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
-#define VMD_DETAIL_VD_CAT_I(a, b) a ## b
-#else
 #define VMD_DETAIL_VD_CAT_I(a, b) VMD_DETAIL_VD_CAT_II(a ## b)
 #define VMD_DETAIL_VD_CAT_II(res) res
-#endif
 #endif /* BOOST_VMD_MSVC */
 
 #define VMD_DETAIL_DATA_ELEM_0(p0, ...) p0

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_is_begin_parens_common.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_is_begin_parens_common.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_is_begin_parens_common.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -5,7 +5,27 @@
 
 #if BOOST_VMD_VARIADICS && BOOST_VMD_MSVC
 
+#include <boost/preprocessor/facilities/empty.hpp>
+
 #define VMD_DETAIL_IS_TUPLE_BEGIN_COMMON_EXPAND(...) 1,1
 
+#define VMD_DETAIL_VD_IS_BEGIN_PARENS_CAT(a, b) VMD_DETAIL_VD_IS_BEGIN_PARENS_CAT_I(a, b)
+#define VMD_DETAIL_VD_IS_BEGIN_PARENS_CAT_I(a, b) VMD_DETAIL_VD_IS_BEGIN_PARENS_CAT_II(a ## b)
+#define VMD_DETAIL_VD_IS_BEGIN_PARENS_CAT_II(res) res
+
+#define VMD_DETAIL_IS_BEGIN_PARENS_SPLIT(i, ...) \
+ VMD_DETAIL_VD_IS_BEGIN_PARENS_CAT(VMD_DETAIL_IS_BEGIN_PARENS_PRIMITIVE_CAT(VMD_DETAIL_IS_BEGIN_PARENS_SPLIT_,i)(__VA_ARGS__),BOOST_PP_EMPTY()) \
+/**/
+
+#define VMD_DETAIL_IS_BEGIN_PARENS_SPLIT_0(a, ...) a
+#define VMD_DETAIL_IS_BEGIN_PARENS_SPLIT_1(a, ...) __VA_ARGS__
+
+#define VMD_DETAIL_IS_BEGIN_PARENS_CAT(a, ...) VMD_DETAIL_IS_BEGIN_PARENS_PRIMITIVE_CAT(a,__VA_ARGS__)
+#define VMD_DETAIL_IS_BEGIN_PARENS_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__
+
+#define VMD_DETAIL_IS_BEGIN_PARENS_IS_VARIADIC_C(...) 1 1
+#define VMD_DETAIL_IS_BEGIN_PARENS_IS_VARIADIC_R_1 1,
+#define VMD_DETAIL_IS_BEGIN_PARENS_IS_VARIADIC_R_VMD_DETAIL_IS_BEGIN_PARENS_IS_VARIADIC_C 0,
+
 #endif /* BOOST_VMD_VARIADICS && BOOST_VMD_MSVC */
 #endif /* VMD_DETAIL_IS_TUPLE_BEGIN_COMMON_HPP */

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_is_empty_common.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_is_empty_common.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/detail/vmd_detail_is_empty_common.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -17,8 +17,8 @@
 
 #else
 
-#define VMD_DETAIL_IS_EMPTY_CAT(a, ...) VMD_DETAIL_IS_EMPTY_PRIMITIVE_CAT(a,__VA_ARGS__)
 #define VMD_DETAIL_IS_EMPTY_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__
+#define VMD_DETAIL_IS_EMPTY_CAT(a, ...) VMD_DETAIL_IS_EMPTY_PRIMITIVE_CAT(a,__VA_ARGS__)
 #define VMD_DETAIL_IS_EMPTY_IIF_0(t, ...) __VA_ARGS__
 #define VMD_DETAIL_IS_EMPTY_IIF_1(t, ...) t
 #define VMD_DETAIL_IS_EMPTY_SPLIT(i, ...) \
@@ -27,6 +27,7 @@
 
 #define VMD_DETAIL_IS_EMPTY_SPLIT_0(a, ...) a
 #define VMD_DETAIL_IS_EMPTY_SPLIT_1(a, ...) __VA_ARGS__
+
 #define VMD_DETAIL_IS_EMPTY_IS_VARIADIC_C(...) 1
 #define VMD_DETAIL_IS_EMPTY_IS_VARIADIC_R_1 1,
 #define VMD_DETAIL_IS_EMPTY_IS_VARIADIC_R_VMD_DETAIL_IS_EMPTY_IS_VARIADIC_C 0,

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_Is_empty_common.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_Is_empty_common.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_Is_empty_common.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -17,15 +17,15 @@
 #include <boost/variadic_macro_data/vmd_is_begin_parens.hpp>
 #include <boost/variadic_macro_data/detail/vmd_detail_is_empty.hpp>
 
-/** \brief Tests whether a parameter is empty or not.
+/** \brief Tests whether its input is empty or not.
 
- The macro checks to see if the parameter is empty or not.
- It returns 1 if the parameter is empty, else returns 0.
+ The macro checks to see if the input is empty or not.
+ It returns 1 if the input is empty, else returns 0.
     
- The macro works through variadic macro support.
+ The macro is a variadic macro taking any input and works through variadic macro support.
     
     The macro is not perfect, and can not be so. The problem
- area is if the parameter to be checked is a function-like
+ area is if the input to be checked is a function-like
     macro name, in which case either a compiler error can result
     or a false result can occur.
     
@@ -35,9 +35,14 @@
     of a variadic version for BOOST_PP_IS_EMPTY, and changed
     in order to also support VC++.
     
- .... = variadic param(s)
+ .... = variadic input
 
- returns = 1 if the param is empty, 0 if it is not
+ returns = 1 if the input is empty, 0 if it is not
+
+ It is recommended to append BOOST_PP_EMPTY() to whatever input
+ is being tested in order to avoid possible warning messages
+ from some compilers about no parameters being passed to the macro
+ when the input is truly empty.
     
 */
 #define BOOST_VMD_IS_EMPTY(...) \

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_Is_empty_pplib.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_Is_empty_pplib.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_Is_empty_pplib.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -18,15 +18,15 @@
 #include <boost/preprocessor/variadic/size.hpp>
 #include <boost/variadic_macro_data/detail/vmd_detail_is_empty.hpp>
 
-/** \brief Tests whether a parameter is empty or not.
+/** \brief Tests whether its input is empty or not.
 
- The macro checks to see if the parameter is empty or not.
- It returns 1 if the parameter is empty, else returns 0.
+ The macro checks to see if the input is empty or not.
+ It returns 1 if the input is empty, else returns 0.
     
- The macro works through variadic macro support.
+ The macro is a variadic macro taking any input and works through variadic macro support.
     
     The macro is not perfect, and can not be so. The problem
- area is if the parameter to be checked is a function-like
+ area is if the input to be checked is a function-like
     macro name, in which case either a compiler error can result
     or a false result can occur.
     
@@ -36,19 +36,24 @@
     of a variadic version for BOOST_PP_IS_EMPTY, and changed
     in order to also support VC++.
     
- param = a parameter
+ .... = variadic input
 
- returns = 1 if the param is empty, 0 if it is not
+ returns = 1 if the input is empty, 0 if it is not
+
+ It is recommended to append BOOST_PP_EMPTY() to whatever input
+ is being tested in order to avoid possible warning messages
+ from some compilers about no parameters being passed to the macro
+ when the input is truly empty.
     
 */
-#define BOOST_VMD_IS_EMPTY(param) \
+#define BOOST_VMD_IS_EMPTY(...) \
     VMD_DETAIL_IS_EMPTY_IIF \
       ( \
       BOOST_PP_DEC \
         ( \
         BOOST_PP_VARIADIC_SIZE \
           ( \
- VMD_DETAIL_IS_EMPTY_COMMON_EXPAND param \
+ VMD_DETAIL_IS_EMPTY_COMMON_EXPAND __VA_ARGS__ \
           ) \
         ) \
       ) \
@@ -56,7 +61,7 @@
       VMD_DETAIL_IS_EMPTY_GEN_ZERO, \
       VMD_DETAIL_IS_EMPTY_TUPLE_BEGIN \
       ) \
- (VMD_DETAIL_IS_EMPTY_NON_FUNCTION_C param ()) \
+ (VMD_DETAIL_IS_EMPTY_NON_FUNCTION_C __VA_ARGS__ ()) \
 /**/
 
 #endif /* BOOST_VMD_VARIADICS && BOOST_VMD_MSVC */

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -5,12 +5,6 @@
 
 #if BOOST_VMD_VARIADICS
 
-#if BOOST_VMD_PPLIB
-#include <boost/variadic_macro_data/vmd_is_begin_parens_pplib.hpp>
-#else
-#include <boost/variadic_macro_data/vmd_is_begin_parens_native.hpp>
-#endif /* BOOST_VMD_PPLIB */
-
 #include <boost/variadic_macro_data/vmd_is_begin_parens_common.hpp>
 
 #endif /* BOOST_VMD_VARIADICS */

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens_common.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens_common.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens_common.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -12,7 +12,25 @@
 
 #include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
 
-#if BOOST_VMD_VARIADICS && !BOOST_VMD_MSVC
+#if BOOST_VMD_VARIADICS
+
+#if BOOST_VMD_MSVC
+
+#include <boost/variadic_macro_data/detail/vmd_detail_is_begin_parens.hpp>
+
+#define BOOST_VMD_IS_BEGIN_PARENS(...) \
+ VMD_DETAIL_IS_BEGIN_PARENS_SPLIT \
+ ( \
+ 0, \
+ VMD_DETAIL_IS_BEGIN_PARENS_CAT \
+ ( \
+ VMD_DETAIL_IS_BEGIN_PARENS_IS_VARIADIC_R_, \
+ VMD_DETAIL_IS_BEGIN_PARENS_IS_VARIADIC_C __VA_ARGS__ \
+ ) \
+ ) \
+/**/
+
+#else
 
 #include <boost/variadic_macro_data/detail/vmd_detail_is_empty.hpp>
 
@@ -54,5 +72,6 @@
       ) \
 /**/
 
+#endif /* BOOST_VMD_MSVC */
 #endif /* BOOST_VMD_VARIADICS && !BOOST_VMD_MSVC */
 #endif /* VMD_IS_TUPLE_BEGIN_COMMON_HPP */

Deleted: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens_native.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens_native.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
+++ (empty file)
@@ -1,58 +0,0 @@
-#if !defined(VMD_IS_TUPLE_BEGIN_NATIVE_HPP)
-#define VMD_IS_TUPLE_BEGIN_NATIVE_HPP
-
-/*
-
- The succeeding comments in this file are in doxygen format.
-
-*/
-
-/** \file
-*/
-
-#include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
-
-#if BOOST_VMD_VARIADICS && BOOST_VMD_MSVC
-
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/variadic_macro_data/vmd_data.hpp>
-#include <boost/variadic_macro_data/detail/vmd_detail_is_begin_parens.hpp>
-
-/** \brief Tests whether a parameter begins with a set of parentheses.
-
- The macro checks to see if the parameter begins with a
- set of parentheses surrounding any tokens.
-
- .... = variadic param(s)
-
- returns = 1 if the param begins with a set of parentheses,
- 0 if it does not.
-
- The macro works through variadic macro support.
-
- The code for the non-VC++ version of this is taken from a
- posting by Paul Mensonides.
-
- This macro is not a test for a parameter which is only
- single set of parentheses surrounding any tokens ( a Boost
- pplib tuple ) since the parameter may have other tokens
- following the beginning set of parentheses and it will still
- return 1.
-
- There is no completely safe way to test whether the param is a tuple.
- At best one can use BOOST_VMD_ASSERT_IS_TUPLE to cause a compiler error
- if the parameter is not a tuple.
-
-*/
-#define BOOST_VMD_IS_BEGIN_PARENS(param) \
- BOOST_PP_DEC \
- ( \
- BOOST_VMD_DATA_SIZE \
- ( \
- VMD_DETAIL_IS_TUPLE_BEGIN_COMMON_EXPAND param \
- ) \
- ) \
-/**/
-
-#endif /* BOOST_VMD_VARIADICS && BOOST_VMD_MSVC */
-#endif /* VMD_IS_TUPLE_BEGIN_NATIVE_HPP */

Deleted: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens_pplib.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_begin_parens_pplib.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
+++ (empty file)
@@ -1,58 +0,0 @@
-#if !defined(VMD_IS_TUPLE_BEGIN_PPLIB_HPP)
-#define VMD_IS_TUPLE_BEGIN_PPLIB_HPP
-
-/*
-
- The succeeding comments in this file are in doxygen format.
-
-*/
-
-/** \file
-*/
-
-#include <boost/variadic_macro_data/detail/vmd_detail_setup.hpp>
-
-#if BOOST_VMD_VARIADICS && BOOST_VMD_MSVC
-
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/variadic/size.hpp>
-#include <boost/variadic_macro_data/detail/vmd_detail_is_begin_parens.hpp>
-
-/** \brief Tests whether a parameter begins with a set of parentheses.
-
- The macro checks to see if the parameter begins with a
- set of parentheses surrounding any tokens.
-
- .... = variadic param(s)
-
- returns = 1 if the param begins with a set of parentheses,
- 0 if it does not.
-
- The macro works through variadic macro support.
-
- The code for the non-VC++ version of this is taken from a
- posting by Paul Mensonides.
-
- This macro is not a test for a parameter which is only
- single set of parentheses surrounding any tokens ( a Boost
- pplib tuple ) since the parameter may have other tokens
- following the beginning set of parentheses and it will still
- return 1.
-
- There is no completely safe way to test whether the param is a tuple.
- At best one can use BOOST_VMD_ASSERT_IS_TUPLE to cause a compiler error
- if the parameter is not a tuple.
-
-*/
-#define BOOST_VMD_IS_BEGIN_PARENS(param) \
- BOOST_PP_DEC \
- ( \
- BOOST_PP_VARIADIC_SIZE \
- ( \
- VMD_DETAIL_IS_TUPLE_BEGIN_COMMON_EXPAND param \
- ) \
- ) \
-/**/
-
-#endif /* BOOST_VMD_VARIADICS && BOOST_VMD_MSVC */
-#endif /* VMD_IS_TUPLE_BEGIN_PPLIB_HPP */

Modified: sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_empty_native.hpp
==============================================================================
--- sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_empty_native.hpp (original)
+++ sandbox/variadic_macro_data/boost/variadic_macro_data/vmd_is_empty_native.hpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -18,15 +18,15 @@
 #include <boost/variadic_macro_data/vmd_data.hpp>
 #include <boost/variadic_macro_data/detail/vmd_detail_is_empty.hpp>
 
-/** \brief Tests whether a parameter is empty or not.
+/** \brief Tests whether its input is empty or not.
 
- The macro checks to see if the parameter is empty or not.
- It returns 1 if the parameter is empty, else returns 0.
+ The macro checks to see if the input is empty or not.
+ It returns 1 if the input is empty, else returns 0.
     
- The macro works through variadic macro support.
+ The macro is a variadic macro taking any input and works through variadic macro support.
     
     The macro is not perfect, and can not be so. The problem
- area is if the parameter to be checked is a function-like
+ area is if the input to be checked is a function-like
     macro name, in which case either a compiler error can result
     or a false result can occur.
     
@@ -36,19 +36,24 @@
     of a variadic version for BOOST_PP_IS_EMPTY, and changed
     in order to also support VC++.
     
- param = a parameter
+ .... = variadic input
 
- returns = 1 if the param is empty, 0 if it is not
+ returns = 1 if the input is empty, 0 if it is not
+
+ It is recommended to append BOOST_PP_EMPTY() to whatever input
+ is being tested in order to avoid possible warning messages
+ from some compilers about no parameters being passed to the macro
+ when the input is truly empty.
     
 */
-#define BOOST_VMD_IS_EMPTY(param) \
+#define BOOST_VMD_IS_EMPTY(...) \
     VMD_DETAIL_IS_EMPTY_IIF \
       ( \
       BOOST_PP_DEC \
         ( \
         BOOST_VMD_DATA_SIZE \
           ( \
- VMD_DETAIL_IS_EMPTY_COMMON_EXPAND param \
+ VMD_DETAIL_IS_EMPTY_COMMON_EXPAND __VA_ARGS__ \
           ) \
         ) \
       ) \
@@ -56,7 +61,7 @@
       VMD_DETAIL_IS_EMPTY_GEN_ZERO, \
       VMD_DETAIL_IS_EMPTY_VC_IS_TUPLE_BEGIN \
       ) \
- (VMD_DETAIL_IS_EMPTY_NON_FUNCTION_C param ()) \
+ (VMD_DETAIL_IS_EMPTY_NON_FUNCTION_C __VA_ARGS__ ()) \
 /**/
 
 #endif /* BOOST_VMD_VARIADICS && BOOST_VMD_MSVC */

Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/vmd_detail.qbk
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/vmd_detail.qbk (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/vmd_detail.qbk 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -124,10 +124,8 @@
 Visual C++ preprocessor.
 
 The macro is called [macroref BOOST_VMD_IS_EMPTY] and will return 1 if its input
-is empty or 0 if its input is not empty. For the standard version the macro
-is a variadic macro which make take any input. For the Visual C++ version the
-macro is not a variadic macro and therefore takes a single parameter,
-although it uses variadic macros in order to work properly.
+is empty or 0 if its input is not empty. The macro
+is a variadic macro which make take any input.
 
 The one situation where the macro may not work properly is if its
 input is a function-like macro name. In that case the macro may

Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_is_begin_parens.cpp
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_is_begin_parens.cpp (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_is_begin_parens.cpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -21,6 +21,7 @@
   #define AN_ARRAY (4,(5,7,f,x))
   #define A_LIST (e,(g,(&,BOOST_PP_NIL)))
   
+ BOOST_TEST(!BOOST_VMD_IS_BEGIN_PARENS());
   BOOST_TEST(BOOST_VMD_IS_BEGIN_PARENS(A_TUPLE));
   BOOST_TEST(BOOST_VMD_IS_BEGIN_PARENS(A_TUPLE2));
   BOOST_TEST(BOOST_VMD_IS_BEGIN_PARENS(A_TUPLE_PLUS));
@@ -31,6 +32,7 @@
   BOOST_TEST(BOOST_VMD_IS_BEGIN_PARENS(A_SEQ));
   BOOST_TEST(BOOST_VMD_IS_BEGIN_PARENS(AN_ARRAY));
   BOOST_TEST(BOOST_VMD_IS_BEGIN_PARENS(A_LIST));
+ BOOST_TEST(BOOST_VMD_IS_BEGIN_PARENS((y)2(x)));
   
 #endif
 

Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_is_empty.cpp
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_is_empty.cpp (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/test/test_is_empty.cpp 2011-08-14 08:03:18 EDT (Sun, 14 Aug 2011)
@@ -3,6 +3,7 @@
 #else
 #include <boost/variadic_macro_data/vmd_is_empty.hpp>
 #endif
+#include <boost/preprocessor/facilities/empty.hpp>
 #include <boost/detail/lightweight_test.hpp>
 
 int main()
@@ -17,11 +18,11 @@
   #define FUNC2(x)
   #define FUNC_GEN() ()
   
- BOOST_TEST(BOOST_VMD_IS_EMPTY());
- BOOST_TEST(BOOST_VMD_IS_EMPTY(DATA));
- BOOST_TEST(!BOOST_VMD_IS_EMPTY((x)));
- BOOST_TEST(BOOST_VMD_IS_EMPTY(OBJECT));
- BOOST_TEST(BOOST_VMD_IS_EMPTY(FUNC(z)));
+ BOOST_TEST(BOOST_VMD_IS_EMPTY(BOOST_PP_EMPTY()));
+ BOOST_TEST(BOOST_VMD_IS_EMPTY(DATA BOOST_PP_EMPTY()));
+ BOOST_TEST(!BOOST_VMD_IS_EMPTY((x BOOST_PP_EMPTY())));
+ BOOST_TEST(BOOST_VMD_IS_EMPTY(OBJECT BOOST_PP_EMPTY()));
+ BOOST_TEST(BOOST_VMD_IS_EMPTY(FUNC(z) BOOST_PP_EMPTY()));
   
 // BOOST_TEST(BOOST_VMD_IS_EMPTY(FUNC_GEN));
 


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