From ae6a66d9b684e80ca0017dc3bb851b1ed7f32780 Mon Sep 17 00:00:00 2001 From: Ed Catmur Date: Sun, 13 Dec 2020 14:53:42 +0000 Subject: [PATCH] Use __cpp_concepts feature test macro to decide on concepts syntax. With gcc 10.2 -std=c++20, which uses the C++20 Standard concepts syntax, __cplusplus = 201709L whereas __cpp_concepts = 201907L (the C++20 value). after 5d63e610aeefb67f96ef9dec622f178c77e5fa3f --- include/outcome/convert.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/outcome/convert.hpp b/include/outcome/convert.hpp index 99cb8694bc..d9941a54bc 100644 --- a/include/outcome/convert.hpp +++ b/include/outcome/convert.hpp @@ -32,7 +32,7 @@ OUTCOME_V2_NAMESPACE_EXPORT_BEGIN namespace concepts { #if defined(__cpp_concepts) -#if !defined(_MSC_VER) && !defined(__clang__) && (__GNUC__ < 9 || __cplusplus < 202000L) +#if !defined(_MSC_VER) && !defined(__clang__) && (__GNUC__ < 9 || __cpp_concepts < 201907L) #define OUTCOME_GCC6_CONCEPT_BOOL bool #else #define OUTCOME_GCC6_CONCEPT_BOOL