From f107acb3c822718aae685f35aa8f0a3cffddab63 Mon Sep 17 00:00:00 2001 From: daan Date: Fri, 4 Sep 2020 10:40:05 -0700 Subject: [PATCH] fix __cplusplus test (pr #287) --- include/mimalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mimalloc.h b/include/mimalloc.h index 80cee2be..c9127e1f 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -24,7 +24,7 @@ terms of the MIT license. A copy of the license can be found in the file #define mi_attr_noexcept #endif -#if (__cplusplus >= 201703) +#if defined(__cplusplus) && (__cplusplus >= 201703) #define mi_decl_nodiscard [[nodiscard]] #elif (__GNUC__ >= 4) || defined(__clang__) // includes clang, icc, and clang-cl #define mi_decl_nodiscard __attribute__((warn_unused_result))