Mario Rueti, a student in my group, needed and wrote the following function objects which seem to be missing in the standard library (only arithmetic and logical operations seem to be defined as function objects). Since these might be of more general interest we wonder if they might fit into boost, e.g. into functional.hpp ?
Matthias
namespace boost { // definition of function objects not defined by STL template <class T> struct bit_and : public binary_function<T,T,T> { T operator()(const T& x, const T& y) const { return x & y; } };
template <class T> struct bit_or : public binary_function<T,T,T> { T operator()(const T& x, const T& y) const { return x | y; } };
template <class T> struct bit_xor : public binary_function<T,T,T> { T operator()(const T& x, const T& y) const { return x ^ y; } };
template <class T> struct bit_not : public unary_function<T,T> { T operator()(const T& x) const { return ~x; } }; }
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost