struct owner_equal;
(since C++26)This function object provides owner-based (as opposed to value-based) mixed-type equal comparison of both std::weak_ptr and std::shared_ptr. The comparison is such that two smart pointers compare equivalent only if they are both empty or if they share ownership, even if the values of the raw pointers obtained by get()
are different (e.g. because they point at different subobjects within the same object).
3) std::owner_equal
deduces the parameter types from the arguments.
Compares lhs and rhs using owner-based semantics. Effectively calls lhs.owner_equal(rhs).
The equal comparison is an equivalence relation.
lhs and rhs are equivalent only if they are both empty or share ownership.
Parameters lhs, rhs - shared-ownership pointers to compare Return valuetrue if lhs and rhs are both empty or share ownership as determined by the owner-based equal comparison, false otherwise.
[edit] Notes [edit] See also provides owner-based equal comparison of shared pointersstd::shared_ptr<T>
) [edit] provides owner-based equal comparison of weak pointers
std::weak_ptr<T>
) [edit]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4