![]()
|
ALINK="#ff0000">
![]() Pair Associative Container
DescriptionA Pair Associative Container is an Associative Container that associates a key with some other object. The value type of a Pair Associative Container is pair<const key_type, data_type>. [1]Refinement ofAssociative ContainerAssociated typesOne new type is introduced, in addition to the types defined in the Associative Container requirements. Additionally, Pair Associative Container introduces one new type restriction
Notation
DefinitionsValid expressionsNone, except for those defined in the Associative Container requirements.Expression semanticsComplexity guaranteesInvariantsModelsNotes[1] The value type must be pair<const key_type, data_type>, rather than pair<key_type, data_type>, because of the Associative Container invariant of key immutability. The data_type part of an object in a Pair Associative Container may be modified, but the key_type part may not be. Note the implication of this fact: a Pair Associative Container cannot provide mutable iterators (as defined in the Trivial Iterator requirements), because the value type of a mutable iterator must be Assignable, and pair<const key_type, data_type> is not Assignable. However, a Pair Associative Container can provide iterators that are not completely constant: iterators such that the expression (*i).second = d is valid. See alsoAssociative Container, Simple Associative Container![]() ![]() Copyright © 1999 Silicon Graphics, Inc. All Rights Reserved. TrademarkInformation
|