Name
operator|| function template — Performs logical or
Synopsis
template<typename T> valarray<bool> operator||(const valarray<T>& a, const valarray<T>& b); template<typename T> valarray<bool> operator||(const valarray<T>& a, const T& y); template<typename T> valarray<bool> operator||(const T& x, const valarray<T>& b);
The ||
operator performs
logical 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 and yields a
bool
result or a result that can
be converted to bool
. As with any
other overloaded operator
||
, short-cut evaluation is not
supported.
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.