Skip to content

Commit

Permalink
Use __cpp_concepts feature test macro
Browse files Browse the repository at this point in the history
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 5d63e61
  • Loading branch information
ecatmur authored Dec 13, 2020
1 parent bbde4ec commit ae6a66d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/outcome/convert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ae6a66d

Please sign in to comment.