diff --git a/test/specify/auto_error.cpp b/test/specify/auto_error.cpp index c0373fd..9ccdcef 100644 --- a/test/specify/auto_error.cpp +++ b/test/specify/auto_error.cpp @@ -6,7 +6,11 @@ // Test auto error (for free func, but same for all contracts). -#if defined(__cplusplus) && __cplusplus >= 201703L // On C++17 or later. +#include <boost/config.hpp> + +// On C++17 or later. +#if (defined(__cplusplus) && __cplusplus >= 201703L) || \ + !defined(BOOST_NO_CXX17_HDR_OPTIONAL) #error "C++17 copy elision invalidates test so forcing expected failure" #else diff --git a/test/specify/auto_pre_error.cpp b/test/specify/auto_pre_error.cpp index 4d16a8a..6505420 100644 --- a/test/specify/auto_pre_error.cpp +++ b/test/specify/auto_pre_error.cpp @@ -6,7 +6,11 @@ // Test auto error after pre (for free func, but same for all contracts). -#if defined(__cplusplus) && __cplusplus >= 201703L // On C++17 or later. +#include <boost/config.hpp> + +// On C++17 or later. +#if (defined(__cplusplus) && __cplusplus >= 201703L) || \ + !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) #error "C++17 copy elision invalidates test so forcing expected failure" #else diff --git a/test/specify/auto_pre_old_error.cpp b/test/specify/auto_pre_old_error.cpp index 40ed9cf..1446416 100644 --- a/test/specify/auto_pre_old_error.cpp +++ b/test/specify/auto_pre_old_error.cpp @@ -6,7 +6,11 @@ // Test auto error after old (for free func, but same for all contracts). -#if defined(__cplusplus) && __cplusplus >= 201703L // On C++17 or later. +#include <boost/config.hpp> + +// On C++17 or later. +#if (defined(__cplusplus) && __cplusplus >= 201703L) || \ + !defined(BOOST_NO_CXX17_STD_APPLY) #error "C++17 copy elision invalidates test so forcing expected failure" #else diff --git a/test/specify/auto_pre_old_post_error.cpp b/test/specify/auto_pre_old_post_error.cpp index ab3e72f..a3a6704 100644 --- a/test/specify/auto_pre_old_post_error.cpp +++ b/test/specify/auto_pre_old_post_error.cpp @@ -6,7 +6,11 @@ // Test auto error after post (for free func, but same for all contracts). -#if defined(__cplusplus) && __cplusplus >= 201703L // On C++17 or later. +#include <boost/config.hpp> + +// On C++17 or later. +#if (defined(__cplusplus) && __cplusplus >= 201703L) || \ + !defined(BOOST_NO_CXX17_STD_INVOKE) #error "C++17 copy elision invalidates test so forcing expected failure" #else diff --git a/test/specify/auto_pre_old_post_except_error.cpp b/test/specify/auto_pre_old_post_except_error.cpp index da826a1..93da6b9 100644 --- a/test/specify/auto_pre_old_post_except_error.cpp +++ b/test/specify/auto_pre_old_post_except_error.cpp @@ -6,7 +6,11 @@ // Test auto error after except (for free func, but same for all contracts). -#if defined(__cplusplus) && __cplusplus >= 201703L // On C++17 or later. +#include <boost/config.hpp> + +// On C++17 or later. +#if (defined(__cplusplus) && __cplusplus >= 201703L) || \ + !defined(BOOST_NO_CXX17_IF_CONSTEXPR) #error "C++17 copy elision invalidates test so forcing expected failure" #else