Skip to main content

std::queue push() method

// (1) Non const version only
void push( const value_type& value );

// (2) Non const version only
void push( value_type&& value );

Pushes the given element value to the end of the queue

  • (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)

Complexity

Equivalent to that of push_back of the underlying container.

Example

important

This section requires improvement. You can help by editing this doc page.

std::queue push() method

// (1) Non const version only
void push( const value_type& value );

// (2) Non const version only
void push( value_type&& value );

Pushes the given element value to the end of the queue

  • (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)

Complexity

Equivalent to that of push_back of the underlying container.

Example

important

This section requires improvement. You can help by editing this doc page.