[libcxx-commits] [libcxx] [libc++] Make sure `flat_set::key_compare` handle `boolean-testable` correctly (PR #132622)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 23 10:23:43 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Hewill Kang (hewillk)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/132622.diff
1 Files Affected:
- (modified) libcxx/include/__flat_set/flat_set.h (+1-1)
``````````diff
diff --git a/libcxx/include/__flat_set/flat_set.h b/libcxx/include/__flat_set/flat_set.h
index cc45db7565bd4..9074e9e9cf241 100644
--- a/libcxx/include/__flat_set/flat_set.h
+++ b/libcxx/include/__flat_set/flat_set.h
@@ -602,7 +602,7 @@ class flat_set {
private:
_LIBCPP_HIDE_FROM_ABI bool __is_sorted_and_unique(auto&& __key_container) const {
- auto __greater_or_equal_to = [this](const auto& __x, const auto& __y) { return !__compare_(__x, __y); };
+ auto __greater_or_equal_to = [this](const auto& __x, const auto& __y) -> bool { return !__compare_(__x, __y); };
return ranges::adjacent_find(__key_container, __greater_or_equal_to) == ranges::end(__key_container);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/132622
More information about the libcxx-commits
mailing list