| commit 65a55c2ba891f6d2492477707f4a2e327a0b40dc |
| Author: Abseil Team <absl-team@google.com> |
| Date: Wed May 29 11:12:50 2024 -0700 |
| |
| 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 |
| |
| 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 |
| |