From afe824490ebae9188be0e96ecff3dbc73b37285c Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Wed, 12 Aug 2020 12:13:19 -0700 Subject: [PATCH] change macro test to use __cplusplus instead of __has_cpp_attribute --- include/gsl/gsl_util | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/gsl/gsl_util b/include/gsl/gsl_util index 2e79605..974655b 100644 --- a/include/gsl/gsl_util +++ b/include/gsl/gsl_util @@ -32,11 +32,11 @@ #endif // _MSC_VER -#if __has_cpp_attribute(nodiscard) >= 201603L +#if defined(__cplusplus) && (__cplusplus >= 201703L) #define GSL_NODISCARD [[nodiscard]] #else #define GSL_NODISCARD -#endif +#endif // defined(__cplusplus) && (__cplusplus >= 201703L) namespace gsl {