struct key_equiv {
key_equiv(key_compare c) : comp(c) { } // (1) C++23
constexpr
key_equiv(key_compare c) : comp(c) { } // (1) C++26
bool
operator()(const_reference x, const_reference y) const { // (2) C++23
return !comp(x.first, y.first) && !comp(y.first, x.first);
}
constexpr bool
operator()(const_reference x, const_reference y) const { // (2) C++26
return !comp(x.first, y.first) && !comp(y.first, x.first);
}
key_compare comp;
};
概要
要素をとってキーの等価比較を行う説明専用の関数オブジェクト。
バージョン
言語
- C++23
処理系
- Clang: ??
- GCC: ??
- Visual C++: ??