Associative Container, Unique Associative Container, Unique Sorted Associative Container, Multiple Sorted Associative Container

Unique Sorted Associative Container

Category: containers

Component type: concept

Description

A Unique Sorted Associative Container is a Sorted Associative Container that is also a Unique Associative Container. That is, it is a Sorted Associative Container with the property that no two elements in the container have the same key.

Refinement of

Sorted Associative Container, Unique Associative Container

Associated types

None, except for those described in the Sorted Associative Container and Unique Associative Container requirements.

Notation

X A type that is a model of Unique Sorted Associative Container

a Object of type X

t Object of type X::value_type

k Object of type X::key_type

p, q Object of type X::iterator

c Object of type X::key_compare

Valid expressions

In addition to the expressions defined in Sorted Associative Container and Unique Associative Container, the following expressions must be valid.

Name Expression Type requirements Return type
Range constructor X(i, j) X a(i, j); i and j are Input Iterators whose value type is convertible to T [1].
Range constructor with compare X(i, j, c) X a(i, j, c); i and j are Input Iterators whose value type is convertible to T [1]. c is an object of type key_compare.
Insert with hint a.insert(p, t) iterator
Insert range a.insert(i, j) i and j are Input Iterators whose value type is convertible to X::value_type. [1] void
Expression semantics
Name Expression Precondition Semantics Postcondition
Range constructor X(i, j) X a(i, j); [i,j) is a valid range. Creates an associative container that contains all of the elements in the range [i,j) that have unique keys. The comparison object used by the container is key_compare(). size() is less than or equal to the distance from i to j.
Range constructor with compare X(i, j, c) X a(i, j, c); [i,j) is a valid range. Creates an associative container that contains all of the elements in the range [i,j) that have unique keys. The comparison object used by the container is c. size() is less than or equal to the distance from i to j.
Insert with hint a.insert(p, t) p is a nonsingular iterator in a. Inserts t into a if and only if
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату