change macro test to use __cplusplus instead of __has_cpp_attribute

This commit is contained in:
Jordan Maples 2020-08-12 12:13:19 -07:00
parent 01eaf5bef1
commit afe824490e

View File

@ -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
{