22 #ifndef GEARS_FUNCTIONAL_COMPARISON_OPERATORS_HPP
23 #define GEARS_FUNCTIONAL_COMPARISON_OPERATORS_HPP
28 namespace functional {
29 struct equal_to_type {
30 template<
typename T,
typename U>
31 constexpr
auto operator()(T&& t, U&& u) const -> decltype(std::forward<T>(t) == std::forward<U>(u)) {
32 return std::forward<T>(t) == std::forward<U>(u);
36 struct not_equal_to_type {
37 template<
typename T,
typename U>
38 constexpr
auto operator()(T&& t, U&& u) const -> decltype(std::forward<T>(t) != std::forward<U>(u)) {
39 return std::forward<T>(t) != std::forward<U>(u);
44 template<
typename T,
typename U>
45 constexpr
auto operator()(T&& t, U&& u) const -> decltype(std::forward<T>(t) > std::forward<U>(u)) {
46 return std::forward<T>(t) > std::forward<U>(u);
51 template<
typename T,
typename U>
52 constexpr
auto operator()(T&& t, U&& u) const -> decltype(std::forward<T>(t) < std::forward<U>(u)) {
53 return std::forward<T>(t) < std::forward<U>(u);
57 struct greater_equal_type {
58 template<
typename T,
typename U>
59 constexpr
auto operator()(T&& t, U&& u) const -> decltype(std::forward<T>(t) >= std::forward<U>(u)) {
60 return std::forward<T>(t) >= std::forward<U>(u);
64 struct less_equal_type {
65 template<
typename T,
typename U>
66 constexpr
auto operator()(T&& t, U&& u) const -> decltype(std::forward<T>(t) <= std::forward<U>(u)) {
67 return std::forward<T>(t) <= std::forward<U>(u);
157 #endif // GEARS_FUNCTIONAL_COMPARISON_OPERATORS_HPP