From 77a9177c31f20cc7a566b0a60a0f0120f310edaf Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Fri, 30 Jan 2015 22:15:54 -0500 Subject: [PATCH 1/4] Remove extraneous include --- include/boost/preprocessor/facilities/is_empty.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/include/boost/preprocessor/facilities/is_empty.hpp b/include/boost/preprocessor/facilities/is_empty.hpp index d0403a9..46aadd3 100644 --- a/include/boost/preprocessor/facilities/is_empty.hpp +++ b/include/boost/preprocessor/facilities/is_empty.hpp @@ -21,7 +21,6 @@ # # else # -# include # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # include # include From dc54fee21c74766c11bfc15ae6d1c53a0d4513af Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Fri, 30 Jan 2015 23:11:07 -0500 Subject: [PATCH 2/4] Remove BOOST_PP_EXPAND usage since it is no needed --- include/boost/preprocessor/tuple/elem.hpp | 3 +-- include/boost/preprocessor/tuple/rem.hpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/boost/preprocessor/tuple/elem.hpp b/include/boost/preprocessor/tuple/elem.hpp index 0ee8a3f..99d0d45 100644 --- a/include/boost/preprocessor/tuple/elem.hpp +++ b/include/boost/preprocessor/tuple/elem.hpp @@ -17,7 +17,6 @@ # # include # include -# include # include # include # include @@ -27,7 +26,7 @@ # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) -# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(BOOST_PP_EXPAND(m ## args),) +# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) /* Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty ) else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM diff --git a/include/boost/preprocessor/tuple/rem.hpp b/include/boost/preprocessor/tuple/rem.hpp index fe8a7d2..ddd36a5 100644 --- a/include/boost/preprocessor/tuple/rem.hpp +++ b/include/boost/preprocessor/tuple/rem.hpp @@ -15,7 +15,6 @@ # # include # include -# include # include # include # @@ -123,7 +122,7 @@ # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args) -# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(BOOST_PP_EXPAND(m ## args),) +# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,) # define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple # else # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__) From 4f0adfb553c87242202c62e63d648f82f1de516f Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Mon, 2 Feb 2015 18:04:58 -0500 Subject: [PATCH 3/4] Reveert removal of BOOST_PP_EXPAND --- include/boost/preprocessor/tuple/elem.hpp | 3 ++- include/boost/preprocessor/tuple/rem.hpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/boost/preprocessor/tuple/elem.hpp b/include/boost/preprocessor/tuple/elem.hpp index 99d0d45..0ee8a3f 100644 --- a/include/boost/preprocessor/tuple/elem.hpp +++ b/include/boost/preprocessor/tuple/elem.hpp @@ -17,6 +17,7 @@ # # include # include +# include # include # include # include @@ -26,7 +27,7 @@ # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) -# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) +# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(BOOST_PP_EXPAND(m ## args),) /* Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty ) else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM diff --git a/include/boost/preprocessor/tuple/rem.hpp b/include/boost/preprocessor/tuple/rem.hpp index ddd36a5..fe8a7d2 100644 --- a/include/boost/preprocessor/tuple/rem.hpp +++ b/include/boost/preprocessor/tuple/rem.hpp @@ -15,6 +15,7 @@ # # include # include +# include # include # include # @@ -122,7 +123,7 @@ # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args) -# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,) +# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(BOOST_PP_EXPAND(m ## args),) # define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple # else # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__) From 1b3fe1570b18e53c0d82cfbd4ec0a54174233824 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Mon, 2 Feb 2015 21:19:50 -0500 Subject: [PATCH 4/4] Put BOOST_PP_EXPAND in correct place for VC++ --- include/boost/preprocessor/tuple/elem.hpp | 4 ++-- include/boost/preprocessor/tuple/rem.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/preprocessor/tuple/elem.hpp b/include/boost/preprocessor/tuple/elem.hpp index 0ee8a3f..88044d3 100644 --- a/include/boost/preprocessor/tuple/elem.hpp +++ b/include/boost/preprocessor/tuple/elem.hpp @@ -27,14 +27,14 @@ # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) -# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(BOOST_PP_EXPAND(m ## args),) +# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) /* Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty ) else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM functionality. See tuple_elem_bug_test.cxx. */ # define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) \ - BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple) \ + BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple)) \ /**/ # else # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__) diff --git a/include/boost/preprocessor/tuple/rem.hpp b/include/boost/preprocessor/tuple/rem.hpp index fe8a7d2..c934447 100644 --- a/include/boost/preprocessor/tuple/rem.hpp +++ b/include/boost/preprocessor/tuple/rem.hpp @@ -123,8 +123,8 @@ # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args) -# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(BOOST_PP_EXPAND(m ## args),) -# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple +# define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,) +# define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple) # else # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__) # define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple