std::owner_less
From cppreference.com
| ヘッダ <memory> で定義 |
||
| template<> struct owner_less<void>; |
(C++17以降) | |
std::owner_less<void> は、パラメータ型が推論される std::owner_less の特殊化です。
目次 |
[編集] ネストされた型
| ネストされた型 | 定義 |
is_transparent
|
unspecified |
[編集] メンバ関数
| operator() |
引数を所有者ベースのセマンティクスで比較する (関数) |
std::owner_less<void>::operator()
| template< class T, class U > bool operator()( const std::shared_ptr<T>& lhs, |
(C++17以降) | |
| template< class T, class U > bool operator()( const std::shared_ptr<T>& lhs, |
(C++17以降) | |
| template< class T, class U > bool operator()( const std::weak_ptr<T>& lhs, |
(C++17以降) | |
| template< class T, class U > bool operator()( const std::weak_ptr<T>& lhs, |
(C++17以降) | |
lhs と rhs を所有者ベースのセマンティクスで比較します。lhs.owner_before(rhs) を効果的に呼び出します。
順序は厳密弱順序関係です。
lhs と rhs は、両方が空であるか、または所有権を共有している場合にのみ等価です。
パラメータ
| lhs, rhs | - | 比較する共有所有権ポインタ |
戻り値
所有者ベースの順序付けによって決定される、lhs が rhs より小さい場合は true。
[編集] 注釈
| 機能テストマクロ | 値 | 規格 | 機能 |
|---|---|---|---|
__cpp_lib_transparent_operators |
201510L |
(C++17) | 透過的な std::owner_less (std::owner_less<void>) |
[編集] 関連項目
| 共有ポインタの所有者ベースの順序を提供します ( std::shared_ptr<T> のパブリックメンバ関数) | |
| weak pointer の所有者ベースの順序付けを提供します ( std::weak_ptr<T> のパブリックメンバ関数) |