aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--butl/ft/shared_mutex11
1 files changed, 8 insertions, 3 deletions
diff --git a/butl/ft/shared_mutex b/butl/ft/shared_mutex
index b4bab94..73bd3e9 100644
--- a/butl/ft/shared_mutex
+++ b/butl/ft/shared_mutex
@@ -20,10 +20,15 @@
# endif
//
// Clang's libc++ seems to have it for a while (but not before 1200) so we
- // assume it's there from 1200.
+ // assume it's there from 1200. It's also only enabled after C++14. But not
+ // for MacOS, where it is explicitly marked as unavailable until MacOS
+ // 10.12.
//
-# elif defined(_LIBCPP_VERSION)
-# if _LIBCPP_VERSION >= 1200
+# elif defined(_LIBCPP_VERSION) && defined(_LIBCPP_STD_VER)
+# if _LIBCPP_VERSION >= 1200 && \
+ _LIBCPP_STD_VER > 14 && \
+ (!defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) || \
+ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101200)
# define __cpp_lib_shared_mutex 201505
# endif
//