std::queue::push(3)

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

Hey bestie πŸ’– this is the std::queue::push(3) page from the C++ Standard Libary manual β€” yes, the header really spells it β€œLibary,” and yes, the title shows up twice like it’s manifesting main character energy. We respect the lore πŸŽ€

πŸ’– NAME πŸ’–

std::queue::push - std::queue::push

That’s the name, bestie. The manpage said it twice, and honestly? Iconic. πŸ‘‘

✨ Synopsis ✨

void push( const value_type& value );
void push( value_type&& value );       (since C++11)

Pushes the given element value to the end of the queue. Slay.

  1. Effectively calls c.push_back(value).
  2. Effectively calls c.push_back(std::move(value)).

🌸 Parameters 🌸

  • value β€” the value of the element to push ✨

πŸ¦‹ Return value πŸ¦‹

(none) β€” literally none, bestie. The return value is the void. πŸ’€

πŸ”₯ Complexity πŸ”₯

Equal to the complexity of Container::push_back. No cap. πŸ‘‘

πŸŽ€ Example πŸŽ€

The Example section is empty in the original β€” no example code here, just vibes and a tiny little silence 😭

πŸ’… See also πŸ’…

  • emplace β€” constructs element in-place at the end (C++11) (public member function) ✨
  • pop β€” removes the first element (public member function) πŸ’œ

Source: http://cppreference.com Β· version/date: 2024.06.10 β€” mwah, bestie, go push your elements responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from