std::queue::operator=(3)

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

πŸ’– std::queue::operator= πŸ’–

Okay so this is the C++ Standard Libary manual page for std::queue::operator=, and bestie, we are absolutely getting into assignment operator territory 🫢✨

✨ NAME ✨

std::queue::operator= β€” literally std::queue::operator= πŸ’…

🌸 Synopsis 🌸

queue& operator=( const queue& other ); (1) (implicitly declared)
queue& operator=( queue&& other );      (2) (since C++11)
                                            (implicitly declared)

Replaces the contents of the container adaptor with the contents of the given argument. No cap πŸ’–

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

πŸŽ€ Parameters πŸŽ€

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

πŸ¦‹ Return value πŸ¦‹

*this β€” that's the whole mood ✨

🌈 Complexity 🌈

(1) and (2) are both equivalent to that of operator= of the underlying container. Slay, but keep it accurate πŸ’…

πŸ“ Example πŸ“

😭 This section is incomplete Reason: no example

πŸ‘‘ See also πŸ‘‘

  • constructor β€” constructs the queue (public member function) πŸŽ€

🏷️ Category 🏷️

  • Todo no example β€” literally the category tag, bestie 😭

Big cute sign-off time πŸ’– this page comes from http://cppreference.com, dated 2024.06.10, and tagged std::queue::operator=(3) β€” source/version/date energy, periodt 🌟

πŸ“¦ where this page comes from