fix: std::optional value() build error on older macOS SDK (#11574)
Summary: `PORTABLE=1 USE_SSE=1 USE_PCLMUL=1 WITH_JEMALLOC_FLAG=1 JEMALLOC=1 make static_lib` on MacOS clang --version: Apple clang version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-darwin22.4.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin compile err like this: util/udt_util.cc:39:39: error: 'value' is unavailable: introduced in macOS 10.14 if (running_ts_sz != recorded_ts_sz.value()) { ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/optional:944:33: note: 'value' has been explicitly marked unavailable here constexpr value_type const& value() const& ^ util/udt_util.cc:217:62: error: 'value' is unavailable: introduced in macOS 10.14 *new_key = StripTimestampFromUserKey(key, record_ts_sz.value()); ^ /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/optional:953:27: note: 'value' has been explicitly marked unavailable here constexpr value_type& value() & ^ 2 errors generated. make: *** [util/udt_util.o] Error 1 Pull Request resolved: https://github.com/facebook/rocksdb/pull/11574 Reviewed By: ajkr Differential Revision: D47269519 Pulled By: cbi42 fbshipit-source-id: da49d90cdf00a0af519f91c0cf7d257401eb395foxigraph-main
parent
f74526341d
commit
1a7c741977
Loading…
Reference in new issue