mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add make_pair, rel_ops, and others...
This commit is contained in:
parent
f86d17d0d4
commit
2fa0ad1fe4
6 changed files with 293 additions and 1 deletions
30
sprout/utility/rel_ops.hpp
Normal file
30
sprout/utility/rel_ops.hpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef SPROUT_UTILITY_REL_OPS_HPP
|
||||
#define SPROUT_UTILITY_REL_OPS_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace rel_ops {
|
||||
template <typename T>
|
||||
inline SPROUT_CONSTEXPR bool operator!=(T const& x, T const& y) {
|
||||
return !(x == y);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline SPROUT_CONSTEXPR bool operator>(T const& x, T const& y) {
|
||||
return y < x;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline SPROUT_CONSTEXPR bool operator<=(T const& x, T const& y) {
|
||||
return !(y < x);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline SPROUT_CONSTEXPR bool operator>=(T const& x, T const& y) {
|
||||
return !(x < y);
|
||||
}
|
||||
} // namespace rel_ops
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_UTILITY_REL_OPS_HPP
|
Loading…
Add table
Add a link
Reference in a new issue