mdbx++: use C++20 concepts only when __cpp_lib_concepts >= 202002.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-06-12 20:20:23 +03:00
parent cdfaad18a2
commit 280fa99831

View File

@ -224,17 +224,12 @@
#ifndef MDBX_HAVE_CXX20_CONCEPTS
#if defined(DOXYGEN) || \
(defined(__cpp_concepts) && __cpp_concepts >= 201907L && \
(!defined(__clang__) || __has_include(<concepts>) || \
(defined(__cpp_lib_concepts) && __cpp_lib_concepts >= 202002L)))
#if __has_include(<concepts>) || \
(defined(__cpp_lib_concepts) && __cpp_lib_concepts >= 202002L)
#include <concepts>
#endif /* <concepts> */
#define MDBX_HAVE_CXX20_CONCEPTS 1
#else
#define MDBX_HAVE_CXX20_CONCEPTS 0
#endif
#endif /* <concepts> */
#endif /* MDBX_HAVE_CXX20_CONCEPTS */
#ifndef MDBX_CXX20_CONCEPT