Adaptor that compares value_type objects by their keys.
Declared in <bslstl_map.h>
class 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 [map.overview]; otherwise, we would have implemented it as a separate component-local class.
| Name | Description |
|---|---|
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 map::value_compare object. |
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 map::value_compare object. |
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 map::value_compare object. |
| Name | Description |
|---|---|
operator() | Return whether x is ordered before y by key. |
| Name | Description |
|---|---|
value_compare [constructor] | Create a value_compare object that uses comparator. |
| Name | Description |
|---|---|
comp | Comparator used to order keys in this map. |
| Name | Description |
|---|---|
bsl::map | Ordered associative container mapping unique keys to values. |