mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
support hash: floating point
This commit is contained in:
parent
63ef07d124
commit
7aa10d1e08
276 changed files with 542 additions and 325 deletions
|
@ -5,32 +5,32 @@
|
|||
#include <sprout/utility/pair/pair.hpp>
|
||||
|
||||
namespace sprout {
|
||||
template<class T1, class T2>
|
||||
template<typename T1, typename T2>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
operator==(sprout::pair<T1, T2> const& x, sprout::pair<T1, T2> const& y) {
|
||||
return x.first == y.first && x.second == y.second;
|
||||
}
|
||||
template<class T1, class T2>
|
||||
template<typename T1, typename T2>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
operator!=(sprout::pair<T1, T2> const& x, sprout::pair<T1, T2> const& y) {
|
||||
return !(x == y);
|
||||
}
|
||||
template<class T1, class T2>
|
||||
template<typename T1, typename T2>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
operator<(sprout::pair<T1, T2> const& x, sprout::pair<T1, T2> const& y) {
|
||||
return x.first < y.first || (!(y.first < x.first) && x.second < y.second);
|
||||
return ((x.first) < (y.first)) || (!((y.first) < (x.first)) && ((x.second) < (y.second)));
|
||||
}
|
||||
template<class T1, class T2>
|
||||
template<typename T1, typename T2>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
operator>(sprout::pair<T1, T2> const& x, sprout::pair<T1, T2> const& y) {
|
||||
return y < x;
|
||||
}
|
||||
template<class T1, class T2>
|
||||
template<typename T1, typename T2>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
operator<=(sprout::pair<T1, T2> const& x, sprout::pair<T1, T2> const& y) {
|
||||
return !(y < x);
|
||||
}
|
||||
template<class T1, class T2>
|
||||
template<typename T1, typename T2>
|
||||
inline SPROUT_CONSTEXPR bool
|
||||
operator>=(sprout::pair<T1, T2> const& x, sprout::pair<T1, T2> const& y) {
|
||||
return !(x < y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue