Commit 8d77ac51 by Jorg Brown Committed by Copybara-Service

Change Bool to BoolT in order to avoid a macro conflict from X11/Xlib.h

PiperOrigin-RevId: 497232675
Change-Id: Ic3cabbb85d90eb4f32a4bee17207e73475258e4b
parent 3d646b08
......@@ -544,9 +544,9 @@ namespace compare_internal {
// Helper functions to do a boolean comparison of two keys given a boolean
// or three-way comparator.
// SFINAE prevents implicit conversions to bool (such as from int).
template <typename Bool,
absl::enable_if_t<std::is_same<bool, Bool>::value, int> = 0>
constexpr bool compare_result_as_less_than(const Bool r) { return r; }
template <typename BoolT,
absl::enable_if_t<std::is_same<bool, BoolT>::value, int> = 0>
constexpr bool compare_result_as_less_than(const BoolT r) { return r; }
constexpr bool compare_result_as_less_than(const absl::weak_ordering r) {
return r < 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment