std::owner_less
提供: cppreference.com
<tbody>
</tbody>
| ヘッダ <memory> で定義
|
||
template<> struct owner_less<void>; |
(C++17以上) | |
std::owner_less<> は std::owner_less の引数の型を推定する特殊化です。
メンバ型
| メンバ型 | 定義 |
is_transparent
|
/* unspecified */ |
ノート
メンバ型 is_transparent はこの関数オブジェクトが透過的な関数オブジェクトである、つまり、任意の型の引数を受理し、不均一な分脈や右辺値引数で使用されたときに不要なコピーや変換を回避する完全転送を使用することを、呼び出し元に示します。 特に、 std::set::find や std::set::lower_bound のようなテンプレート関数は Compare 型についてこのメンバ型を使用します。
メンバ関数
| オーナーベースのセマンティクスを用いて引数を比較します (関数) |
std::owner_less<void>::operator()
<tbody> </tbody> template<class T, class U> bool operator()( const std::shared_ptr<T>& lhs, const std::shared_ptr<U>& rhs ) const noexcept; |
(C++17以上) | |
template<class T, class U> bool operator()( const std::shared_ptr<T>& lhs, const std::weak_ptr<U>& rhs ) const noexcept; |
(C++17以上) | |
template<class T, class U> bool operator()( const std::weak_ptr<T>& lhs, const std::shared_ptr<U>& rhs ) const noexcept; |
(C++17以上) | |
template<class T, class U> bool operator()( const std::weak_ptr<T>& lhs, const std::weak_ptr<U>& rhs ) const noexcept; |
(C++17以上) | |
オーナーベースのセマンティクスを用いて lhs と rhs を比較します。 実質的に lhs.owner_before(rhs) を呼びます。
順序は狭義弱順序関係です。
lhs と rhs はどちらも空であるか所有権を共有する場合にのみ同等です。
引数
| lhs, rhs | - | 比較する共有所有権のポインタ |
戻り値
オーナーベースの順序付けによって決定されるところによって lhs が rhs より小さい場合は true。
関連項目
| shared_ptr のオーナーベースの順序付けを提供します ( std::shared_ptr<T>のパブリックメンバ関数)
| |
| weak_ptr のオーナーベースの順序付けを提供します ( std::weak_ptr<T>のパブリックメンバ関数)
|