std::priori...::operator=(3)

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

πŸ’… std::priori...::operator=(3) πŸ’…

okay so this page lives in the C++ Standard Libary manual (spelling exactly as the page says, bestie, do not @ me 😭). It's all about std::priority_queue::operator=, aka the assignment operator for your container adaptor era πŸ’–.

πŸŽ€ NAME πŸŽ€

std::priority_queue::operator= β€” std::priority_queue::operator=. That's the name, and yes it's giving "I said what I said" energy πŸ’….

πŸ¦‹ Synopsis πŸ¦‹

priority_queue& operator=( const priority_queue& other ); (1)
(implicitly declared)

priority_queue& operator=( priority_queue&& other );      (2) (since C++11)
(implicitly declared)

It replaces the contents of the container adaptor with the contents of the given argument. Lowkey that's the whole job ✨.

  1. Copy assignment operator. Replaces the contents with a copy of the contents of other. Effectively calls c = other.c; comp = other.comp;.
  2. Move assignment operator. Replaces the contents with those of other using move semantics. Effectively calls c = std::move(other.c); comp = std::move(other.comp);.

🌸 Parameters 🌸

  • other β€” another container adaptor to be used as source πŸ‘€

✨ Return value ✨

*this β€” periodt πŸ’…

πŸ”₯ Complexity πŸ”₯

1,2) Equivalent to that of operator= of the underlying container.

😭 Example 😭

This section is incomplete Reason: no example

πŸ‘‘ See also πŸ‘‘

  • constructor β€” constructs the priority_queue (public member function)

πŸ’€ Category πŸ’€

  • Todo no example

okay bestie, that's the whole page πŸ’– source/version: http://cppreference.com Β· date: 2024.06.10 β€” go forth and assign responsibly 🫢

πŸ“¦ where this page comes from