Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71297 - in branches/pplib/variadics/boost/preprocessor: facilities tuple/detail
From: eldiener_at_[hidden]
Date: 2011-04-15 16:49:21


Author: eldiener
Date: 2011-04-15 16:49:20 EDT (Fri, 15 Apr 2011)
New Revision: 71297
URL: http://svn.boost.org/trac/boost/changeset/71297

Log:
Updated overload functionality.
Text files modified:
   branches/pplib/variadics/boost/preprocessor/facilities/overload.hpp | 23 +++++++++++++++++++++++
   branches/pplib/variadics/boost/preprocessor/tuple/detail/use_overload.hpp | 12 ++++++------
   2 files changed, 29 insertions(+), 6 deletions(-)

Modified: branches/pplib/variadics/boost/preprocessor/facilities/overload.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/facilities/overload.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/facilities/overload.hpp 2011-04-15 16:49:20 EDT (Fri, 15 Apr 2011)
@@ -20,14 +20,35 @@
 # include <boost/preprocessor/config/config.hpp>
 # include <boost/preprocessor/variadic/size.hpp>
 #
+# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
+# include <boost/preprocessor/facilities/empty.hpp>
+# endif
+#
 # /* BOOST_PP_OVERLOAD */
 #
 #define BOOST_PP_OVERLOAD(prefix, ...) \
   BOOST_PP_OV_CAT(prefix, BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)) \
 /**/
 #
+# /* BOOST_PP_CALL_OVERLOAD */
+#
+# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
+#
+# define BOOST_PP_CALL_OVERLOAD(prefix, ...) \
+ BOOST_PP_CALL_OV_CAT(BOOST_PP_OVERLOAD(prefix, __VA_ARGS__)(__VA_ARGS__),BOOST_PP_EMPTY()) \
+/**/
+#
+# else
+#
+# define BOOST_PP_CALL_OVERLOAD(prefix, ...) \
+ BOOST_PP_OVERLOAD(prefix, __VA_ARGS__)(__VA_ARGS__) \
+/**/
+#
+# endif
+#
 # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
 # define BOOST_PP_OV_CAT(a, b) BOOST_PP_OV_CAT_I(a, b)
+# define BOOST_PP_CALL_OV_CAT(a, b) BOOST_PP_CALL_OV_CAT_I(a, b)
 # else
 # define BOOST_PP_OV_CAT(a, b) BOOST_PP_OV_CAT_OO((a, b))
 # define BOOST_PP_OV_CAT_OO(par) BOOST_PP_OV_CAT_I ## par
@@ -38,6 +59,8 @@
 # else
 # define BOOST_PP_OV_CAT_I(a, b) BOOST_PP_OV_CAT_II(a ## b)
 # define BOOST_PP_OV_CAT_II(res) res
+# define BOOST_PP_CALL_OV_CAT_I(a, b) BOOST_PP_CALL_OV_CAT_II(a ## b)
+# define BOOST_PP_CALL_OV_CAT_II(res) res
 # endif
 #
 #endif /* BOOST_PP_VARIADICS */

Modified: branches/pplib/variadics/boost/preprocessor/tuple/detail/use_overload.hpp
==============================================================================
--- branches/pplib/variadics/boost/preprocessor/tuple/detail/use_overload.hpp (original)
+++ branches/pplib/variadics/boost/preprocessor/tuple/detail/use_overload.hpp 2011-04-15 16:49:20 EDT (Fri, 15 Apr 2011)
@@ -36,7 +36,7 @@
 # else
 #
 # define BOOST_PP_TUPLE_DETAIL_ELEM_USE_OVERLOAD(prefix,...) \
- BOOST_PP_OVERLOAD(prefix, __VA_ARGS__)(__VA_ARGS__) \
+ BOOST_PP_CALL_OVERLOAD(prefix, __VA_ARGS__) \
          /**/
 #
 # endif
@@ -55,7 +55,7 @@
 # else
 #
 # define BOOST_PP_TUPLE_DETAIL_REM_USE_OVERLOAD(prefix,...) \
- BOOST_PP_OVERLOAD(prefix, __VA_ARGS__)(__VA_ARGS__) \
+ BOOST_PP_CALL_OVERLOAD(prefix, __VA_ARGS__) \
          /**/
 #
 # endif
@@ -74,7 +74,7 @@
 # else
 #
 # define BOOST_PP_TUPLE_DETAIL_REVERSE_USE_OVERLOAD(prefix,...) \
- BOOST_PP_OVERLOAD(prefix, __VA_ARGS__)(__VA_ARGS__) \
+ BOOST_PP_CALL_OVERLOAD(prefix, __VA_ARGS__) \
          /**/
 #
 # endif
@@ -93,7 +93,7 @@
 # else
 #
 # define BOOST_PP_TUPLE_DETAIL_TO_ARRAY_USE_OVERLOAD(prefix,...) \
- BOOST_PP_OVERLOAD(prefix, __VA_ARGS__)(__VA_ARGS__) \
+ BOOST_PP_CALL_OVERLOAD(prefix, __VA_ARGS__) \
          /**/
 #
 # endif
@@ -112,7 +112,7 @@
 # else
 #
 # define BOOST_PP_TUPLE_DETAIL_TO_LIST_USE_OVERLOAD(prefix,...) \
- BOOST_PP_OVERLOAD(prefix, __VA_ARGS__)(__VA_ARGS__) \
+ BOOST_PP_CALL_OVERLOAD(prefix, __VA_ARGS__) \
          /**/
 #
 # endif
@@ -131,7 +131,7 @@
 # else
 #
 # define BOOST_PP_TUPLE_DETAIL_TO_SEQ_USE_OVERLOAD(prefix,...) \
- BOOST_PP_OVERLOAD(prefix, __VA_ARGS__)(__VA_ARGS__) \
+ BOOST_PP_CALL_OVERLOAD(prefix, __VA_ARGS__) \
          /**/
 #
 # endif


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