Skip to content

Commit cc53c54

Browse files
authored
Make sure compare handle boolean-testable correctly
1 parent 206b42c commit cc53c54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/__flat_set/flat_set.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ class flat_set {
602602

603603
private:
604604
_LIBCPP_HIDE_FROM_ABI bool __is_sorted_and_unique(auto&& __key_container) const {
605-
auto __greater_or_equal_to = [this](const auto& __x, const auto& __y) { return !__compare_(__x, __y); };
605+
auto __greater_or_equal_to = [this](const auto& __x, const auto& __y) -> bool { return !__compare_(__x, __y); };
606606
return ranges::adjacent_find(__key_container, __greater_or_equal_to) == ranges::end(__key_container);
607607
}
608608

0 commit comments

Comments
 (0)