22 #ifndef GEARS_FUNCTIONAL_LOGICAL_OPERATORS_HPP
23 #define GEARS_FUNCTIONAL_LOGICAL_OPERATORS_HPP
28 namespace functional {
29 struct logical_and_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 logical_or_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);
43 struct logical_not_type {
45 constexpr
auto operator()(T&& t) const -> decltype(!std::forward<T>(t)) {
46 return !std::forward<T>(t);
97 #endif // GEARS_FUNCTIONAL_LOGICAL_OPERATORS_HPP