duration_test.cc
76.4 KB
-
PR #1728: Workaround broken compilation against NDK r25 · 8bb5dc43
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1728 When targeting Android NDK r25 (reached EOL now, but still in some use) one gets the following error: ``` $(SOURCE_ROOT)/contrib/restricted/abseil-cpp/absl/time/time.h:1762:37: error: invalid operands to binary expression ('std::strong_ordering' and 'const std::strong_ordering') if (auto c = lhs_hi <=> rhs_hi; c != std::strong_ordering::equal) { ``` The error indicates the lack of `operator<=>` between two `std::strong_ordering` items. I believe that this should be controlled by `__cpp_lib_three_way_comparison` (_Three-way comparison (library support)_, see [this article](https://en.cppreference.com/w/cpp/feature_test)), not by `__cpp_impl_three_way_comparison` (which stands for _Three-way comparison (compiler support)_). Fixes #1725. The problem was introduced in a2766235. Merge 32e1d3d889859ef8a32bf3460349814a2203444c into 69c46839 Merging this change closes #1728 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1728 from georgthegreat:fix-time 32e1d3d889859ef8a32bf3460349814a2203444c PiperOrigin-RevId: 663723253 Change-Id: I29f7d2b562cc5ad8e11cd46b538ba69acee0f314
Yuriy Chernyshov committed