summaryrefslogtreecommitdiff
path: root/absl/hash
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2024-05-29 11:12:50 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2024-05-29 11:13:42 -0700
commit65a55c2ba891f6d2492477707f4a2e327a0b40dc (patch)
tree58462a5d545a0a9af2778b7b46775f9898beefab /absl/hash
parent3f9c32553cad456b24dd58aa0e2b156cf04f6571 (diff)
Do not make std::filesystem::path hash available for macOS <10.15
C++17 <filesystem> is only available on macOS 10.15 and newer, so do not enable this feature on older versions. PiperOrigin-RevId: 638348906 Change-Id: I5e12db47513f7f8aeb9e55a3e253c866ec046d47
Diffstat (limited to 'absl/hash')
-rw-r--r--absl/hash/internal/hash.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/absl/hash/internal/hash.h b/absl/hash/internal/hash.h
index b7d89b01..03bf1839 100644
--- a/absl/hash/internal/hash.h
+++ b/absl/hash/internal/hash.h
@@ -599,7 +599,9 @@ H AbslHashValue(H hash_state, std::basic_string_view<Char> str) {
#if defined(__cpp_lib_filesystem) && __cpp_lib_filesystem >= 201703L && \
!defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) && \
(!defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) || \
- __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000)
+ __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000) && \
+ (!defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) || \
+ __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500)
#define ABSL_INTERNAL_STD_FILESYSTEM_PATH_HASH_AVAILABLE 1