diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-01 07:55:33 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-01 07:55:33 +0200 |
commit | 9f4f8e8cadb49980422d0b64530c4e73c3945556 (patch) | |
tree | 87da81113b14b3a27d82d4345a81a4256cf01830 | |
parent | 20fe8fea93ad2165d3f44453c648179c6ed6bd53 (diff) |
Fix shared_mutex feature test for libc++ and MacOS
-rw-r--r-- | butl/ft/shared_mutex | 11 |
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 // |