remove unnecessary type operators

This commit is contained in:
BlackMATov
2021-11-25 23:10:40 +07:00
parent 19a588bf75
commit 7b512e182c

View File

@@ -75,16 +75,6 @@ namespace meta_hpp
std::same_as<T, void_type>;
}
template < detail::type_family T >
bool operator<(type_id l, const T& r) noexcept {
return static_cast<bool>(r) && l < r.get_id();
}
template < detail::type_family T >
bool operator<(const T& l, type_id r) noexcept {
return !static_cast<bool>(l) || l.get_id() < r;
}
template < detail::type_family T, detail::type_family U >
bool operator<(const T& l, const U& r) noexcept {
if ( !static_cast<bool>(r) ) {
@@ -98,16 +88,6 @@ namespace meta_hpp
return l.get_id() < r.get_id();
}
template < detail::type_family T >
bool operator==(type_id l, const T& r) noexcept {
return static_cast<bool>(r) && l == r.get_id();
}
template < detail::type_family T >
bool operator==(const T& l, type_id r) noexcept {
return static_cast<bool>(l) && l.get_id() == r;
}
template < detail::type_family T, detail::type_family U >
bool operator==(const T& l, const U& r) noexcept {
if ( static_cast<bool>(l) != static_cast<bool>(r) ) {
@@ -121,16 +101,6 @@ namespace meta_hpp
return l.get_id() == r.get_id();
}
template < detail::type_family T >
bool operator!=(type_id l, const T& r) noexcept {
return !(l == r);
}
template < detail::type_family T >
bool operator!=(const T& l, type_id r) noexcept {
return !(l == r);
}
template < detail::type_family T, detail::type_family U >
bool operator!=(const T& l, const U& r) noexcept {
return !(l == r);