20 General utilities library [utilities]

20.8 Function objects [function.objects]

20.8.7 Bitwise operations [bitwise.operations]

The library provides basic function object classes for all of the bitwise operators in the language ([expr.bit.and], [expr.or], [expr.xor]).

template <class T> struct bit_and { T operator()(const T& x, const T& y) const; typedef T first_argument_type; typedef T second_argument_type; typedef T result_type; };

operator() returns x & y.

template <class T> struct bit_or { T operator()(const T& x, const T& y) const; typedef T first_argument_type; typedef T second_argument_type; typedef T result_type; };

operator() returns x | y.

template <class T> struct bit_xor { T operator()(const T& x, const T& y) const; typedef T first_argument_type; typedef T second_argument_type; typedef T result_type; };

operator() returns x ^ y.