BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare Class Reference

#include <bslstl_multimap.h>

Public Types

typedef bool result_type
 
typedef value_type first_argument_type
 
typedef value_type second_argument_type
 

Public Member Functions

 value_compare (const value_compare &original)=default
 
 ~value_compare ()=default
 
value_compareoperator= (const value_compare &rhs)=default
 
bool operator() (const value_type &x, const value_type &y) const
 

Protected Member Functions

 value_compare (COMPARATOR comparator)
 

Protected Attributes

COMPARATOR comp
 

Friends

class multimap
 

Detailed Description

template<class KEY, class VALUE, class COMPARATOR = std::less<KEY>, class ALLOCATOR = allocator<pair<const KEY, VALUE> >>
class bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare

This nested class defines a mechanism for comparing two objects of value_type by adapting an object of (template parameter) type COMPARATOR, which compares two objects of (template parameter) type KEY . Note that this class exactly matches its definition in the C++11 standard [23.4.4.1]; otherwise, we would have implemented it as a separate component-local class.

See bslstl_multimap

Member Typedef Documentation

◆ first_argument_type

template<class KEY , class VALUE , class COMPARATOR = std::less<KEY>, class ALLOCATOR = allocator<pair<const KEY, VALUE> >>
typedef value_type bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare::first_argument_type

This typedef is an alias for the type of the first parameter of the overload of operator() (the comparison function) provided by a multimap::value_compare object.

◆ result_type

template<class KEY , class VALUE , class COMPARATOR = std::less<KEY>, class ALLOCATOR = allocator<pair<const KEY, VALUE> >>
typedef bool bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare::result_type

This typedef is an alias for the result type of a call to the overload of operator() (the comparison function) provided by a multimap::value_compare object.

◆ second_argument_type

template<class KEY , class VALUE , class COMPARATOR = std::less<KEY>, class ALLOCATOR = allocator<pair<const KEY, VALUE> >>
typedef value_type bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare::second_argument_type

This typedef is an alias for the type of the second parameter of the overload of operator() (the comparison function) provided by a multimap::value_compare object.

Constructor & Destructor Documentation

◆ value_compare() [1/2]

template<class KEY , class VALUE , class COMPARATOR , class ALLOCATOR >
bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare::value_compare ( COMPARATOR  comparator)
inlineprotected

Create a value_compare object that uses the specified comparator.

◆ value_compare() [2/2]

template<class KEY , class VALUE , class COMPARATOR = std::less<KEY>, class ALLOCATOR = allocator<pair<const KEY, VALUE> >>
bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare::value_compare ( const value_compare original)
default

◆ ~value_compare()

template<class KEY , class VALUE , class COMPARATOR = std::less<KEY>, class ALLOCATOR = allocator<pair<const KEY, VALUE> >>
bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare::~value_compare ( )
default

Member Function Documentation

◆ operator()()

template<class KEY , class VALUE , class COMPARATOR , class ALLOCATOR >
bool bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare::operator() ( const value_type x,
const value_type y 
) const
inline

Return true if the specified x object is ordered before the specified y object, as determined by the comparator supplied at construction, and false otherwise.

◆ operator=()

template<class KEY , class VALUE , class COMPARATOR = std::less<KEY>, class ALLOCATOR = allocator<pair<const KEY, VALUE> >>
value_compare & bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare::operator= ( const value_compare rhs)
default

Friends And Related Symbol Documentation

◆ multimap

template<class KEY , class VALUE , class COMPARATOR = std::less<KEY>, class ALLOCATOR = allocator<pair<const KEY, VALUE> >>
friend class multimap
friend

Member Data Documentation

◆ comp

template<class KEY , class VALUE , class COMPARATOR = std::less<KEY>, class ALLOCATOR = allocator<pair<const KEY, VALUE> >>
COMPARATOR bsl::multimap< KEY, VALUE, COMPARATOR, ALLOCATOR >::value_compare::comp
protected

The documentation for this class was generated from the following file: