mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:04:12 +08:00
mdbx++: disable C++20 concepts for stupid AppleClang 13.x (hotfix).
This commit is contained in:
parent
df6b9028ec
commit
739e02655e
@ -24,6 +24,10 @@ Acknowledgements:
|
|||||||
|
|
||||||
- [gcxfd <i@rmw.link>](https://github.com/gcxfd) for reporting, contributing and testing.
|
- [gcxfd <i@rmw.link>](https://github.com/gcxfd) for reporting, contributing and testing.
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
|
||||||
|
- Disabled C++20 concepts for stupid AppleClang 13.x
|
||||||
|
|
||||||
Minors:
|
Minors:
|
||||||
|
|
||||||
- Fixed returning `MDBX_RESULT_TRUE` (-1) from `mdbx_env_set_option()`.
|
- Fixed returning `MDBX_RESULT_TRUE` (-1) from `mdbx_env_set_option()`.
|
||||||
|
12
mdbx.h++
12
mdbx.h++
@ -194,7 +194,9 @@
|
|||||||
#ifndef MDBX_CXX20_CONCEPT
|
#ifndef MDBX_CXX20_CONCEPT
|
||||||
#if defined(DOXYGEN) || \
|
#if defined(DOXYGEN) || \
|
||||||
(defined(__cpp_concepts) && __cpp_concepts >= 201907L && \
|
(defined(__cpp_concepts) && __cpp_concepts >= 201907L && \
|
||||||
(!defined(__clang__) || __clang_major__ >= 12))
|
(!defined(__clang__) || (__clang_major__ >= 12 && !defined(__APPLE__)) || \
|
||||||
|
__clang_major__ >= \
|
||||||
|
/* Hope Apple will fix concepts in AppleClang 14 */ 14))
|
||||||
#define MDBX_CXX20_CONCEPT(CONCEPT, NAME) CONCEPT NAME
|
#define MDBX_CXX20_CONCEPT(CONCEPT, NAME) CONCEPT NAME
|
||||||
#else
|
#else
|
||||||
#define MDBX_CXX20_CONCEPT(CONCEPT, NAME) typename NAME
|
#define MDBX_CXX20_CONCEPT(CONCEPT, NAME) typename NAME
|
||||||
@ -204,7 +206,9 @@
|
|||||||
#ifndef MDBX_ASSERT_CXX20_CONCEPT_SATISFIED
|
#ifndef MDBX_ASSERT_CXX20_CONCEPT_SATISFIED
|
||||||
#if defined(DOXYGEN) || \
|
#if defined(DOXYGEN) || \
|
||||||
(defined(__cpp_concepts) && __cpp_concepts >= 201907L && \
|
(defined(__cpp_concepts) && __cpp_concepts >= 201907L && \
|
||||||
(!defined(__clang__) || __clang_major__ >= 12))
|
(!defined(__clang__) || (__clang_major__ >= 12 && !defined(__APPLE__)) || \
|
||||||
|
__clang_major__ >= \
|
||||||
|
/* Hope Apple will fix concepts in AppleClang 14 */ 14))
|
||||||
#define MDBX_ASSERT_CXX20_CONCEPT_SATISFIED(CONCEPT, TYPE) \
|
#define MDBX_ASSERT_CXX20_CONCEPT_SATISFIED(CONCEPT, TYPE) \
|
||||||
static_assert(CONCEPT<TYPE>)
|
static_assert(CONCEPT<TYPE>)
|
||||||
#else
|
#else
|
||||||
@ -473,7 +477,9 @@ static MDBX_CXX20_CONSTEXPR void *memcpy(void *dest, const void *src,
|
|||||||
|
|
||||||
#if defined(DOXYGEN) || \
|
#if defined(DOXYGEN) || \
|
||||||
(defined(__cpp_concepts) && __cpp_concepts >= 201907L && \
|
(defined(__cpp_concepts) && __cpp_concepts >= 201907L && \
|
||||||
(!defined(__clang__) || __clang_major__ >= 12))
|
(!defined(__clang__) || (__clang_major__ >= 12 && !defined(__APPLE__)) || \
|
||||||
|
__clang_major__ >= \
|
||||||
|
/* Hope Apple will fix concepts in AppleClang 14 */ 14))
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
concept MutableByteProducer = requires(T a, char array[42]) {
|
concept MutableByteProducer = requires(T a, char array[42]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user