std::hash(s...shared_ptr)(3)
π std::hash(s...shared_ptr)(3) π
okay bestie, welcome to the C++ Standard Libary manual page for std::hash(std::experimental::shared_ptr) β the (3) is right there, and the synopsis is serving library fundamentals TS realness. this page is all about the std::hash specialization for std::experimental::shared_ptr<T>, and it is lowkey iconic β¨.
π NAME π
std::hash(std::experimental::shared_ptr) β that's the name, and the page repeats it as std::hash(std::experimental::shared_ptr) too. double name, double main character energy π
.
πΈ Synopsis πΈ
here's the synopsis exactly as it's doing its little line-break dance:
template< class T > struct
(library fundamentals
hash<std::experimental::shared_ptr<T>>; TS)
the line breaks are canon, don't come for me π. this is the hash<std::experimental::shared_ptr<T>> specialization, and the synopsis is tagged with (library fundamentals ... TS).
then the tea: the template specialization of std::hash for std::experimental::shared_ptr<T> allows users to obtain hashes of objects of type std::experimental::shared_ptr<T> π«Ά.
For a given std::experimental::shared_ptr<T> p, this specialization ensures that:
std::hash<std::experimental::shared_ptr<T>>()(p) ==
std::hash<T*>()(p.get()).
like, that equality is the whole vibe check. β
π¦ Example π¦
This section is incomplete
Reason: no example
not me begging for an example ππ. that's literally all it says, bestie.
π See also π
hashβ hash function object β(C++11)β(class template)π₯
π Categories π
- Noindexed pages
- Todo no example
xoxo bestie, source/version http://cppreference.com, date 2024.06.10, page std::hash(s...shared_ptr)(3) β mwah ππ
π¦ 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