A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/algorithm/../algorithm/../../cpp/memory/owner_hash.html below:

std::owner_hash - cppreference.com

struct owner_hash;

(since C++26)

This function object provides owner-based (as opposed to value-based) hashing of both std::weak_ptr and std::shared_ptr.

[edit] Nested types [edit] Member functions calculates the hash of the shared-ownership pointer
(function) std::owner_hash::operator()

Equivalent to return key.owner_hash();.

Parameters key - shared-ownership pointer to be hashed Return value

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

[edit] Notes [edit] See also provides owner-based hashing of shared pointers
(public member function of std::shared_ptr<T>) [edit] provides owner-based hashing of weak pointers
(public member function of 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