diff --git a/include/boost/preprocessor/config/config.hpp b/include/boost/preprocessor/config/config.hpp index 78b3f2a..2c7ece9 100644 --- a/include/boost/preprocessor/config/config.hpp +++ b/include/boost/preprocessor/config/config.hpp @@ -80,7 +80,7 @@ # if !defined BOOST_PP_VARIADICS # /* variadic support explicitly disabled for all untested compilers */ -# if defined __GCCXML__ || (defined __NVCC__ && 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(__PGI) && !defined(__EDG__)) +# if defined __GCCXML__ || (defined __NVCC__ && defined __CUDACC__) || defined __PATHSCALE__ || defined __DMC__ || (defined __CODEGEARC__ && !defined(__clang__)) || (defined __BORLANDC__ && !defined(__clang__)) || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || (defined __HP_aCC && !defined __EDG__) || defined __MRC__ || defined __SC__ || (defined(__PGI) && !defined(__EDG__)) # define BOOST_PP_VARIADICS 0 # elif defined(_MSC_VER) && defined(__clang__) # define BOOST_PP_VARIADICS 1 diff --git a/test/cpp_standard.cpp b/test/cpp_standard.cpp index 8b926ba..885fc81 100644 --- a/test/cpp_standard.cpp +++ b/test/cpp_standard.cpp @@ -378,8 +378,6 @@ bret += PRINT_MACRO_RESULTS(xglue(HIGH, LOW),"hello" ", world"); } -#if BOOST_PP_VARIADICS || __cplusplus > 199711L - int print_macros_common_2() { @@ -407,6 +405,8 @@ bret += PRINT_MACRO_RESULTS(char p[] = join(x, y);,char p[] = "x ## y";); } +#if BOOST_PP_VARIADICS && __cplusplus > 199711L + int print_macros_common_3() { @@ -514,11 +514,17 @@ int print_macros() #define FTN_LIKE(a) ( a ) #define FTN_LIKE( a )( /* note the white space */ a /* other stuff on this line */ ) -#if __cplusplus <= 199711L && !BOOST_PP_VARIADICS +#if !BOOST_PP_VARIADICS bret += print_macros_common_1(); bret += print_macros_common_4(); +#elif __cplusplus <= 199711L + +bret += print_macros_common_2(); +bret += print_macros_common_1(); +bret += print_macros_common_4(); + #elif __cplusplus <= 201703L bret += print_macros_common_2();