From 9f4f8e8cadb49980422d0b64530c4e73c3945556 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 1 Feb 2017 07:55:33 +0200 Subject: Fix shared_mutex feature test for libc++ and MacOS --- butl/ft/shared_mutex | 11 ++++++++--- 1 file 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 // -- cgit v1.1