cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : STL Containers : multiset : operators
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forum
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
STL Containers
bitset
deque
list
map
multimap
multiset
priority_queue
queue
set
stack
vector
multiset
comparison operators
multiset::multiset
multiset::~multiset
member functions:
· multiset::begin
· multiset::clear
· multiset::count
· multiset::empty
· multiset::end
· multiset::equal_range
· multiset::erase
· multiset::find
· multiset::get_allocator
· multiset::insert
· multiset::key_comp
· multiset::lower_bound
· multiset::max_size
· multiset::operator=
· multiset::rbegin
· multiset::rend
· multiset::size
· multiset::swap
· multiset::upper_bound
· multiset::value_comp

-

comparison operators function
template <class Key, class Compare, class Allocator>
  bool operator== ( const multiset<Key,Compare,Allocator>& x,
                    const multiset<Key,T,Compare,Allocator>& y );
template <class Key, class Compare, class Allocator>
  bool operator<  ( const multiset<Key,Compare,Allocator>& x,
                    const multiset<Key,T,Compare,Allocator>& y );
template <class Key, class Compare, class Allocator>
  bool operator!= ( const multiset<Key,Compare,Allocator>& x,
                    const multiset<Key,T,Compare,Allocator>& y );
template <class Key, class Compare, class Allocator>
  bool operator>  ( const multiset<Key,Compare,Allocator>& x,
                    const multiset<Key,T,Compare,Allocator>& y );
template <class Key, class Compare, class Allocator>
  bool operator>= ( const multiset<Key,Compare,Allocator>& x,
                    const multiset<Key,T,Compare,Allocator>& y );
template <class Key, class Compare, class Allocator>
  bool operator<= ( const multiset<Key,Compare,Allocator>& x,
                    const multiset<Key,T,Compare,Allocator>& y );

Global comparison operator functions

These overloaded global operator functions perform the appropriate comparison operation between multiset containers x and y.

Operations == and != are performed by comparing the elements using algorithm equal.

Operations <, >, <= and >= are performed by using algorithm lexicographical_compare, which requires that the type of the elements (T) has the < operation (less-than) defined between two objects of that type.

These operators are overloaded in header <set>.

Parameters

x, y
multiset containers, having both the same template parameters (Key, Compare and Allocator).

Return Value

true if the condition holds, and false otherwise.

© The C++ Resources Network, 2000-2007 - All rights reserved
Spotted an error? - contact us