Skip to content

Commit

Permalink
types.hpp: cleanup umax operators
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekotekina committed Apr 18, 2021
1 parent 987f8d1 commit 0c8681a
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions rpcs3/util/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,30 +462,6 @@ constexpr inline struct umax_helper
{
return rhs == static_cast<S>(-1);
}

#if __cpp_impl_three_way_comparison >= 201711 && !__INTELLISENSE__
#else
template <typename T>
friend constexpr std::enable_if_t<std::is_unsigned_v<std::common_type_t<T>>, bool> operator==(const T& lhs, const umax_helper&)
{
return lhs == static_cast<std::common_type_t<T>>(-1);
}
#endif

#if __cpp_impl_three_way_comparison >= 201711
#else
template <typename T, typename S = std::common_type_t<T>, typename = std::enable_if_t<std::is_unsigned_v<S>>>
constexpr bool operator!=(const T& rhs) const
{
return rhs != static_cast<S>(-1);
}

template <typename T>
friend constexpr std::enable_if_t<std::is_unsigned_v<std::common_type_t<T>>, bool> operator!=(const T& lhs, const umax_helper&)
{
return lhs != static_cast<std::common_type_t<T>>(-1);
}
#endif
} umax;

enum class f16 : u16{};
Expand Down

0 comments on commit 0c8681a

Please sign in to comment.