std::pmr::o...::operator!=(3)

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

std::pmr::o...::operator!=(3) β€” hiii bestie πŸ’– this page is from the C++ Standard Libary manual, and it's all about the std::pmr::operator== and std::pmr::operator!= duo for std::pmr::memory_resource. Slay, let's go πŸŽ€

✨ NAME ✨

std::pmr::operator==,std::pmr::operator!= - std::pmr::operator==,std::pmr::operator!=

Yep, both operators are listed, and the same std::pmr::operator==,std::pmr::operator!= text shows up twice in the NAME situation β€” iconic duplication, no notes πŸ’…

🌸 Synopsis 🌸

Defined in header <memory_resource>, and the signatures are exactly these:

          Defined in header <memory_resource>
          bool operator==( const std::pmr::memory_resource& a,            (1)
       (since C++17)
                           const std::pmr::memory_resource& b ) noexcept;
          bool operator!=( const std::pmr::memory_resource& a,            (2)
       (since C++17)
                           const std::pmr::memory_resource& b ) noexcept;
       (until C++20)

The (1) one is operator==, the (2) one is operator!=, and both are tagged (since C++17). The operator!= signature also has an (until C++20) note hanging out at the bottom 🫢

It compares the memory_resources a and b for equality. Two memory_resources compare equal if and only if memory allocated from one memory_resource can be deallocated from the other and vice versa. That's the whole vibe check: interchangeable deallocation energy ✨

The != operator is synthesized from operator==. (since C++20)

πŸ”₯ Return value πŸ”₯

  1. &a == &b || a.is_equal(b)
  2. !(a == b)

πŸ‘€ See also πŸ‘€

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

πŸ’– source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::pmr::o...::operator!=(3) β€” bye bestie, you ate this one! πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from