Inserting elements in extensible associative sequences
The semantics of MPL's insert metafunction for an extensible associative
sequence is defined as:
"For any Extensible Associative Sequence s, iterator pos in s, and
arbitrary type x:
typedef insert::type r;
Semantics: r is concept-identical and equivalent to s, except that
at< r, key_type::type >::type is identical to value_type::type."
What happens if the key type of x is already in s?
Thanks,
Eric.
"Lemings, Eric B. \(Contr\)"
The semantics of MPL's insert metafunction for an extensible associative sequence is defined as:
"For any Extensible Associative Sequence s, iterator pos in s, and arbitrary type x:
typedef insert
::type r;Semantics: r is concept-identical and equivalent to s, except that at< r, key_type
::type >::type is identical to value_type::type."What happens if the key type of x is already in s?
That's covered by the semantics; it's not a special case. The new
value value_type::type is associated with the key
key_type::type in r.
HTH,
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
participants (2)
-
David Abrahams
-
Lemings, Eric B. (Contr)