operator^ function template — Performs bitwise exclusive or
template<typename T> valarray<T> operator^(const valarray<T>& a, const valarray<T>& b); template<typename T> valarray<T> operator^(const valarray<T>& a, const T& y); template<typename T> valarray<T> operator^(const T& x, const valarray<T>& b);
The ^
operator performs
bitwise exclusive or on
each x
^
y
, in
which x
is a scalar or an element
of a
, and y
is a scalar or an element of b
. When operating on two arrays, they must
have the same size. The resulting array has the same size as the
argument array(s). The type T
must be one for which operator
^
is defined.