operator==,!=(std::allocator)
提供: cppreference.com
(1) | ||
template<class T1, class T2 > bool operator==(const allocator<T1>& lhs, const allocator<T2>& rhs )throw(); | (C++11未満) | |
template<class T1, class T2 > bool operator==(const allocator<T1>& lhs, const allocator<T2>& rhs )noexcept; | (C++11以上) (C++20未満) | |
template<class T1, class T2 > constexprbool operator==(const allocator<T1>& lhs, const allocator<T2>& rhs )noexcept; | (C++20以上) | |
(2) | ||
template<class T1, class T2 > bool operator!=(const allocator<T1>& lhs, const allocator<T2>& rhs )throw(); | (C++11未満) | |
template<class T1, class T2 > bool operator!=(const allocator<T1>& lhs, const allocator<T2>& rhs )noexcept; | (C++11以上) (C++20未満) | |
2つのデフォルトアロケータを比較します。 デフォルトアロケータはステートレスであるため、2つのデフォルトアロケータは常に等しくなります。
1)true を返します。
2)false を返します。
[編集]引数
lhs, rhs | - | 比較するデフォルトアロケータ |
[編集]戻り値
1)true。
2)false。