Przejdź do głównej zawartości

std::priority_queue operator=

// (1) Non const version only
priority_queue& operator=( const priority_queue& other );

// (2) Non const version only
priority_queue& operator=( priority_queue&& other );

Replaces the contents of the container adaptor with those of other.

  • (1)
    Copy assignment operator. Replaces the contents with a copy of the contents of other.
    zanotuj

    Effectively calls c = other.c.

  • (2)
    Move assignment operator. Replaces the contents with those of other using move semantics.
    zanotuj

    Effectively calls c = std::move(other.c).

Both operators are implicitly declared, which means that Container has to be copyable/movable for them to be generated.

Parameters

  • other - another container adaptor to use as data source

Return value

A reference to the container, *this.

Exceptions

Equivalent to that of operator= of the underlying container.

Complexity

Equivalent to that of operator= of the underlying container.

Example

important

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

std::priority_queue operator=

// (1) Non const version only
priority_queue& operator=( const priority_queue& other );

// (2) Non const version only
priority_queue& operator=( priority_queue&& other );

Replaces the contents of the container adaptor with those of other.

  • (1)
    Copy assignment operator. Replaces the contents with a copy of the contents of other.
    zanotuj

    Effectively calls c = other.c.

  • (2)
    Move assignment operator. Replaces the contents with those of other using move semantics.
    zanotuj

    Effectively calls c = std::move(other.c).

Both operators are implicitly declared, which means that Container has to be copyable/movable for them to be generated.

Parameters

  • other - another container adaptor to use as data source

Return value

A reference to the container, *this.

Exceptions

Equivalent to that of operator= of the underlying container.

Complexity

Equivalent to that of operator= of the underlying container.

Example

important

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