mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-28 18:48:48 +08:00
mdbx++: disable using C++20 concepts for CLANG < 12.
This commit is contained in:
parent
a9e99241b7
commit
a8115267a6
12
mdbx.h++
12
mdbx.h++
@ -192,7 +192,9 @@
|
||||
#endif /* MDBX_CXX20_UNLIKELY */
|
||||
|
||||
#ifndef MDBX_CXX20_CONCEPT
|
||||
#if defined(DOXYGEN) || (defined(__cpp_concepts) && __cpp_concepts >= 201907L)
|
||||
#if defined(DOXYGEN) || \
|
||||
(defined(__cpp_concepts) && __cpp_concepts >= 201907L && \
|
||||
(!defined(__clang__) || __clang_major__ >= 12))
|
||||
#define MDBX_CXX20_CONCEPT(CONCEPT, NAME) CONCEPT NAME
|
||||
#else
|
||||
#define MDBX_CXX20_CONCEPT(CONCEPT, NAME) typename NAME
|
||||
@ -200,7 +202,9 @@
|
||||
#endif /* MDBX_CXX20_CONCEPT */
|
||||
|
||||
#ifndef MDBX_ASSERT_CXX20_CONCEPT_SATISFIED
|
||||
#if defined(DOXYGEN) || (defined(__cpp_concepts) && __cpp_concepts >= 201907L)
|
||||
#if defined(DOXYGEN) || \
|
||||
(defined(__cpp_concepts) && __cpp_concepts >= 201907L && \
|
||||
(!defined(__clang__) || __clang_major__ >= 12))
|
||||
#define MDBX_ASSERT_CXX20_CONCEPT_SATISFIED(CONCEPT, TYPE) \
|
||||
static_assert(CONCEPT<TYPE>)
|
||||
#else
|
||||
@ -466,7 +470,9 @@ static MDBX_CXX20_CONSTEXPR void *memcpy(void *dest, const void *src,
|
||||
size_t bytes) noexcept;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if defined(DOXYGEN) || (defined(__cpp_concepts) && __cpp_concepts >= 201907L)
|
||||
#if defined(DOXYGEN) || \
|
||||
(defined(__cpp_concepts) && __cpp_concepts >= 201907L && \
|
||||
(!defined(__clang__) || __clang_major__ >= 12))
|
||||
|
||||
template <typename T>
|
||||
concept MutableByteProducer = requires(T a, char array[42]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user