22 #ifndef GEARS_FUNCTIONAL_BITWISE_OPERATORS_HPP
23 #define GEARS_FUNCTIONAL_BITWISE_OPERATORS_HPP
28 namespace functional {
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);
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);
52 constexpr
auto operator()(T&& t) const -> decltype(~std::forward<T>(t)) {
53 return ~std::forward<T>(t);
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);
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);
163 #endif // GEARS_FUNCTIONAL_BITWISE_OPERATORS_HPP