template <typename U>
bool operator()(const U &lhs, const container_t &rhs) const {
- return lhs < project_removal_class(rhs.v);
+ if constexpr (std::is_integral_v<U>) {
+ return std::cmp_less(lhs, project_removal_class(rhs.v));
+ } else {
+ return lhs < project_removal_class(rhs.v);
+ }
}
template <typename U>
bool operator()(const container_t &lhs, const U &rhs) const {
- return project_removal_class(lhs.v) < rhs;
+ if constexpr (std::is_integral_v<U>) {
+ return std::cmp_less(project_removal_class(lhs.v), rhs);
+ } else {
+ return project_removal_class(lhs.v) < rhs;
+ }
}
};
struct removal_registry_disposer_t {