This class template implements a value‐semantic container type holding an ordered sequence of unique keys (of the template parameter type, KEY).
Synopsis
Declared in <bslstl_set.h>
template<
class KEY,
class COMPARATOR = std::less<KEY>,
class ALLOCATOR = allocator<KEY>>
class set;
Description
This class: * supports a complete set of value‐semantic operations except for BDEX serialization * is exception‐neutral (agnostic except for the at method) * is alias‐safe * is const thread‐safe For terminology see {`bsldoc_glossary`}.
Type Aliases
Name |
Description |
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
|
This |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this object. |
Assignment operators |
|
|
|
Return a const iterator to the first element, or |
|
Return an iterator providing non‐modifiable access to the past‐the‐end element in the ordered sequence of |
|
Remove all entries from this set. Note that the set is empty after this call, but allocated memory may be retained for future use. |
|
|
|
|
|
Return a const reverse iterator to the last element, or |
|
Return a const reverse iterator to prior‐to‐the‐beginning. |
|
Emplace a newly constructed |
|
Emplace a newly constructed |
|
Return |
|
|
|
|
|
|
|
|
|
Return (a copy of) the allocator used for memory allocation by this set. |
|
|
|
Insert each unique value from the specified |
|
Return the key‐comparison functor used by this set. |
|
|
|
Return a theoretical upper bound on this set's size. |
|
|
|
|
|
Return the number of elements in this set. |
|
Exchange the value and comparator with |
|
|
|
Return a functor for comparing two |
Deduction Guides
Name |
Description |
Deduce |
|
Deduce |
|
Deduce |
|
Deduce |
|
Deduce |
|
Deduce |
|
Deduce |
|
Deduce |
Non-Member Functions
Name |
Description |
Erase all elements in |
|
Perform a lexicographic three‐way comparison of |
|
Return |
|
Exchange the value and comparator of |
Created with MrDocs