std::shared_ptr<T>::owner_hash

Returns an unspecified value such that for any object other where owner_equal(other) is true, owner_hash() == other.owner_hash() is true.

# Declarations

std::size_t owner_hash() const noexcept;

(since C++26)

# Return value

A value that is identical for any std::shared_ptr or std::weak_ptr object sharing the same ownership.

# Notes

Feature-test macro Value Std Feature __cpp_lib_smart_ptr_owner_equality 202306L (C++26) Enabling the use of std::shared_ptr as keys in unordered associative containers

# Example

This section is incompleteReason: example

# See also