std::hash(s...shared_ptr)(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ 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