From ad22f9686ecd6c8f8c04c17a30ed159c1c0a61ce Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 11 Jan 2018 14:20:16 +0000 Subject: [PATCH 1/3] Fix some links --- doc/ref/identity_n.html | 2 +- doc/ref/tuple_eat.html | 2 +- doc/ref/tuple_elem.html | 2 +- doc/ref/while_d_macros.html | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/ref/identity_n.html b/doc/ref/identity_n.html index 0c01dd3..13fc5e0 100644 --- a/doc/ref/identity_n.html +++ b/doc/ref/identity_n.html @@ -33,7 +33,7 @@

Requirements

- Header:  <boost/preprocessor/facilities/identity.hpp> + Header:  <boost/preprocessor/facilities/identity.hpp>

Sample Code

diff --git a/doc/ref/tuple_eat.html b/doc/ref/tuple_eat.html
index 963647f..f1d7c1c 100644
--- a/doc/ref/tuple_eat.html
+++ b/doc/ref/tuple_eat.html
@@ -42,7 +42,7 @@ not occur.
Header:  <boost/preprocessor/tuple/eat.hpp>

Sample Code

-
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/tuple/eat.hpp>

#define OP(a, b) (a b)

#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT(2))(1, 2)

// or for the variadic version (v)

#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT())(1, 2)

MACRO(0) // expands to nothing
MACRO(1) // expands to (1, 2)
+
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/tuple/eat.hpp>

#define OP(a, b) (a b)

#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT(2))(1, 2)

// or for the variadic version (v)

#define MACRO(n) BOOST_PP_IF(n, OP, BOOST_PP_TUPLE_EAT())(1, 2)

MACRO(0) // expands to nothing
MACRO(1) // expands to (1, 2)

© Copyright Housemarque Oy 2002 diff --git a/doc/ref/tuple_elem.html b/doc/ref/tuple_elem.html index 417eaa2..0f4885f 100644 --- a/doc/ref/tuple_elem.html +++ b/doc/ref/tuple_elem.html @@ -49,7 +49,7 @@ or
Header:  <boost/preprocessor/tuple/elem.hpp>

Sample Code

-
#include <boost/preprocessor/tuple/elem.hpp>

#define TUPLE (a, b, c, d)

BOOST_PP_TUPLE_ELEM(4, 0, TUPLE) // expands to a
BOOST_PP_TUPLE_ELEM(4, 3, TUPLE) // expands to d

// or for the variadic version (v)

BOOST_PP_TUPLE_ELEM(0, TUPLE) // expands to a in the variadic version
BOOST_PP_TUPLE_ELEM(3, TUPLE) // expands to d in the variadic version
+
#include <boost/preprocessor/tuple/elem.hpp>

#define TUPLE (a, b, c, d)

BOOST_PP_TUPLE_ELEM(4, 0, TUPLE) // expands to a
BOOST_PP_TUPLE_ELEM(4, 3, TUPLE) // expands to d

// or for the variadic version (v)

BOOST_PP_TUPLE_ELEM(0, TUPLE) // expands to a in the variadic version
BOOST_PP_TUPLE_ELEM(3, TUPLE) // expands to d in the variadic version

© Copyright Housemarque Oy 2002 diff --git a/doc/ref/while_d_macros.html b/doc/ref/while_d_macros.html index 6f4d23a..a9c61f1 100644 --- a/doc/ref/while_d_macros.html +++ b/doc/ref/while_d_macros.html @@ -12,12 +12,12 @@ From a329a67b47e396f053723e016565702e8829fc34 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 14 Feb 2018 22:01:04 -0500 Subject: [PATCH 2/3] NVidia compiler supports variadic macros. --- include/boost/preprocessor/config/config.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/preprocessor/config/config.hpp b/include/boost/preprocessor/config/config.hpp index 28dcdd4..e9c4ca2 100644 --- a/include/boost/preprocessor/config/config.hpp +++ b/include/boost/preprocessor/config/config.hpp @@ -71,8 +71,10 @@ # define BOOST_PP_VARIADICS_MSVC 0 # if !defined BOOST_PP_VARIADICS # /* variadic support explicitly disabled for all untested compilers */ -# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI +# if defined __GCCXML__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI # define BOOST_PP_VARIADICS 0 +# elif defined(__CUDACC__) +# define BOOST_PP_VARIADICS 1 # elif defined(_MSC_VER) && defined(__clang__) # define BOOST_PP_VARIADICS 1 # /* VC++ (C/C++) and Intel C++ Compiler >= 17.0 with MSVC */ From 00b2f4462445d7dd17bd11a8c8fdc26b2e41d653 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sun, 18 Feb 2018 09:47:44 -0500 Subject: [PATCH 3/3] Allow the IBM compiler to default to the level of C++/C compliance to determine default variadic macro support --- include/boost/preprocessor/config/config.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/preprocessor/config/config.hpp b/include/boost/preprocessor/config/config.hpp index e9c4ca2..cdb044c 100644 --- a/include/boost/preprocessor/config/config.hpp +++ b/include/boost/preprocessor/config/config.hpp @@ -71,7 +71,7 @@ # define BOOST_PP_VARIADICS_MSVC 0 # if !defined BOOST_PP_VARIADICS # /* variadic support explicitly disabled for all untested compilers */ -# if defined __GCCXML__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI +# if defined __GCCXML__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __PGI # define BOOST_PP_VARIADICS 0 # elif defined(__CUDACC__) # define BOOST_PP_VARIADICS 1