Standard C++ Library Class Reference
upper_bound (const key_type& x) const;
Returns an iterator to the first element whose key is smaller than or equal to x. If no such
element exists then end() is returned.
value_compare
value_comp () const;
Returns a function object capable of comparing key values using the comparison operation,
Compare, of the current multiset.
Non-member Operators
template <class Key, class Compare, class Allocator>
operator== (const multiset<Key, Compare, Allocator>& x,
const multiset<Key, Compare, Allocator>& y);
Returns true if all elements in x are element-wise equal to all elements in y, using
(T::operator==). Otherwise it returns false.
template <class Key, class Compare, class Allocator>
operator< (const multiset<Key, Compare, Allocator>& x,
const multiset<Key, Compare, Allocator>& y);
Returns true if x is lexicographically less than y. Otherwise, it returns false.
template <class Key, class Compare, class Allocator>
void swap (multiset<Key,Compare,Allocator>& a,
multiset<Key,Compare,Allocator>&b);
Efficiently swaps the contents of a and b.
Example
//
// multiset.cpp
//
#include <set>
#iclude <iostream.h>
typedef multiset<int, less<int>, allocator> set_type;
ostream& operator<<(ostream& out, const set_type& s)
{
copy(s.begin(),s.end(),
ostream_iterator<set_type::value_type>(cout," "));
return out;
}
int main(void)
{
// create a multiset of ints
set_type si;
int i;