From af65130fa17f92c4ff32ce72d295ef502ba20683 Mon Sep 17 00:00:00 2001 From: CromwellEnage <32967088+CromwellEnage@users.noreply.github.com> Date: Fri, 4 Jan 2019 11:40:07 -0500 Subject: [PATCH] Update BOOST_PARAMETER_*_ARITY preprocessor guard statements Adjust for the fact that BOOST_PARAMETER_MAX_ARITY is defined regardless of whether or not BOOST_PARAMETER_HAS_PERFECT_FORWARDING is defined. --- test/basics.hpp | 5 ++--- test/earwicker.cpp | 5 ++--- test/ntp.cpp | 3 +-- test/optional_deduced_sfinae.cpp | 5 ++--- test/sfinae.cpp | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/test/basics.hpp b/test/basics.hpp index 4bed83b..41b94f5 100644 --- a/test/basics.hpp +++ b/test/basics.hpp @@ -9,15 +9,14 @@ #include -#if !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) #if (BOOST_PARAMETER_MAX_ARITY < 4) #error Define BOOST_PARAMETER_MAX_ARITY as 4 or greater. #endif -#if (BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY < 5) +#if !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) && \ + (BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY < 5) #error Define BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY \ as 5 or greater. #endif -#endif #include #include diff --git a/test/earwicker.cpp b/test/earwicker.cpp index 46260d2..f71a965 100644 --- a/test/earwicker.cpp +++ b/test/earwicker.cpp @@ -5,15 +5,14 @@ #include -#if !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) #if (BOOST_PARAMETER_MAX_ARITY < 4) #error Define BOOST_PARAMETER_MAX_ARITY as 4 or greater. #endif -#if (BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY < 5) +#if !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) && \ + (BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY < 5) #error Define BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY \ as 5 or greater. #endif -#endif #include diff --git a/test/ntp.cpp b/test/ntp.cpp index f574296..798f182 100644 --- a/test/ntp.cpp +++ b/test/ntp.cpp @@ -5,8 +5,7 @@ #include -#if !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) && \ - (BOOST_PARAMETER_MAX_ARITY < 4) +#if (BOOST_PARAMETER_MAX_ARITY < 4) #error Define BOOST_PARAMETER_MAX_ARITY as 4 or greater. #endif diff --git a/test/optional_deduced_sfinae.cpp b/test/optional_deduced_sfinae.cpp index 56b7245..b77cc05 100644 --- a/test/optional_deduced_sfinae.cpp +++ b/test/optional_deduced_sfinae.cpp @@ -5,15 +5,14 @@ #include -#if !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) #if (BOOST_PARAMETER_MAX_ARITY < 2) #error Define BOOST_PARAMETER_MAX_ARITY as 2 or greater. #endif -#if (BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY < 2) +#if !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) && \ + (BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY < 2) #error Define BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY \ as 2 or greater. #endif -#endif #include #include diff --git a/test/sfinae.cpp b/test/sfinae.cpp index 46dbe51..c99b097 100644 --- a/test/sfinae.cpp +++ b/test/sfinae.cpp @@ -5,10 +5,10 @@ #include -#if !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) #if (BOOST_PARAMETER_MAX_ARITY < 2) #error Define BOOST_PARAMETER_MAX_ARITY as 2 or greater. #endif +#if !defined(BOOST_PARAMETER_HAS_PERFECT_FORWARDING) #if (BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY < 3) #error Define BOOST_PARAMETER_EXPONENTIAL_OVERLOAD_THRESHOLD_ARITY \ as 3 or greater.