std::pmr::m...do_is_equal(3)

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

okay so bestie, welcome to the page for std::pmr::m...do_is_equal(3) from the C++ Standard Libary manual β€” yes, that's the exact title, typo and all, and we're obsessed. πŸ’…βœ¨

🌸 NAME 🌸

std::pmr::memory_resource::do_is_equal β€” std::pmr::memory_resource::do_is_equal. That's the name, that's the whole name, and it's giving repeating-yourself main character energy. πŸ’–

πŸ¦‹ Synopsis πŸ¦‹

virtual bool do_is_equal( const std::pmr::memory_resource& other )
(since C++17)
const noexcept = 0;

Compares *this for equality with other. That's the bit, bestie. 🫢

Two memory_resources compare equal if and only if memory allocated from one memory_resource can be deallocated from the other and vice versa. Like, that's the whole equality rule and it's kinda iconic. ✨

🌈 Notes 🌈

Okay so The most-derived type of other may not match the most derived type of *this. That's a whole vibe check, fr. A derived class implementation therefore must typically check whether the most derived types of *this and other match using dynamic_cast, and immediately return false if the cast fails. So yeah, don't skip that check, bestie β€” it's literally in the notes. πŸ’€

πŸ’… See also πŸ’…

  • is_equal β€” compare for equality with another memory_resource (public member function). πŸ‘‘

That's the whole std::pmr::m...do_is_equal(3) tea, bestie. Shoutout to http://cppreference.com and the date 2024.06.10 for this one β€” mwah. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from