std::logical_and
提供: cppreference.com
< cpp | utility | functional
ヘッダ <functional> で定義 | ||
template<class T > struct logical_and; | (C++14未満) | |
template<class T =void> struct logical_and; | (C++14以上) | |
論理積を行うための関数オブジェクト。 実質的に型 T
に対して operator&& を呼びます。
目次 |
[編集]特殊化
標準ライブラリは
| (C++14以上) |
メンバ型
| (C++20未満) |
[編集]メンバ関数
operator() | 2つの引数の論理積を返します (パブリックメンバ関数) |
std::logical_and::operator()
bool operator()(const T& lhs, const T& rhs )const; | (C++14未満) | |
constexprbool operator()(const T& lhs, const T& rhs )const; | (C++14以上) | |
lhs
と rhs
の論理積を返します。
引数
lhs, rhs | - | 論理積を計算する値 |
戻り値
lhs && rhs の値。
例外
(なし)
実装例
constexprbool operator()(const T &lhs, const T &rhs)const{return lhs && rhs;} |