A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/reference/stack/stack/operators/ below:

function

<stack>

std::relational operators (stack) (1)
template <class T, class Container>  bool operator== (const stack<T,Container>& lhs, const stack<T,Container>& rhs);
(2)
template <class T, class Container>  bool operator!= (const stack<T,Container>& lhs, const stack<T,Container>& rhs);
(3)
template <class T, class Container>  bool operator<  (const stack<T,Container>& lhs, const stack<T,Container>& rhs);
(4)
template <class T, class Container>  bool operator<= (const stack<T,Container>& lhs, const stack<T,Container>& rhs);
(5)
template <class T, class Container>  bool operator>  (const stack<T,Container>& lhs, const stack<T,Container>& rhs);
(6)
template <class T, class Container>  bool operator>= (const stack<T,Container>& lhs, const stack<T,Container>& rhs);

Relational operators for stack

Performs the appropriate comparison operation between lhs and rhs.

Each of these operator overloads calls the same operator on the underlying container objects.



Parameters
lhs, rhs
stack objects (to the left- and right-hand side of the operator, respectively).

Return Valuetrue if the condition holds, and false otherwise.

Complexity Constant (a single call to the comparison operator on the underlying containers). Although notice that this operation on the underlying containers is itself up to linear in the size of the smaller object for standard containers.

Data races Both containers, lhs and rhs, are accessed.
Up to all of their contained elements may be accessed.

Exception safety Provides the same level of guarantees as the operation performed on the container.

See also
stack::stack
Construct stack (public member function)
stack::swap
Swap contents (public member function)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4