/*
  more_functional

  Copyright (C) 2013 Taiji Yamada <taiji@aihara.co.jp>

  Distributed under the Boost Software License, Version 1.0.
  (See http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef _more_functional_
#define _more_functional_

namespace std {

template <typename T>
struct bitshift_left : binary_function<T, T, T> {
  T operator() (const T &x, const T &y) const
  { return x << y; }
};
template <typename T>
struct bitshift_right : binary_function<T, T, T> {
  T operator() (const T &x, const T &y) const
  { return x >> y; }
};

template <typename T>
struct bitwise_not : unary_function<T, T> {
  T operator() (const T &x) const
  { return ~x; }
};

template <typename T>
struct bitwise_and : binary_function<T, T, T> {
  T operator() (const T &x, const T &y) const
  { return x & y; }
};
template <typename T>
struct bitwise_xor : binary_function<T, T, T> {
  T operator() (const T &x, const T &y) const
  { return x ^ y; }
};
template <typename T>
struct bitwise_or : binary_function<T, T, T> {
  T operator() (const T &x, const T &y) const
  { return x | y; }
};

}

#endif
