std::shared...::owner_hash(3)
Okay bestie, welcome to the std::shared_ptr::owner_hash page from the C++ Standard Library manual β the header says C++ Standard Libary (typo and all, we stan π) and the page is std::shared...::owner_hash(3). β¨
π NAME π
std::shared_ptr::owner_hash β yeah, itβs literally std::shared_ptr::owner_hash. Main character function energy, no notes. π
β¨ Synopsis β¨
std::size_t owner_hash() const noexcept; (since C++26)
It returns an unspecified value such that, for any object other where owner_equal(other) is true, owner_hash() == other.owner_hash() is true. π₯
This hashing is used to make shared and weak pointers usable as keys in unordered associative containers, typically through std::owner_hash. iykyk.
π Return value π
A value that is identical for any std::shared_ptr or std::weak_ptr object sharing the same ownership. Slay, consistency. π«Ά
π§ Notes π§
Feature-test macro check, bestie:
- Feature-test macro:
__cpp_lib_smart_ptr_owner_equality - Value:
202306L - Std:
(C++26) - Feature: Enabling the use of
std::shared_ptras keys in unordered associative containers
π Example π
This section is incomplete. π
Reason: example.
π¦ See also π¦
owner_hashβ provides owner-based hashing for shared and weak pointers(C++26)(class).
π Category π
- Category:
* Todo with reason
Later, bestie β source: http://cppreference.com; version/date: 2024.06.10; manual page: std::shared...::owner_hash(3) πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms