Title
Mixup between mapped_type and value_type for associative containers
Status
resolved
Section
[associative.reqmts]
Submitter
Marc Glisse

Created on 2011-05-04.00:00:00 last changed 122 months ago

Messages

Date: 2014-03-03.13:52:20

[ Notes to the editor: The above are carefully selected phrases that can be used for global search-and-replace within the specified sections without accidentally making changes to correct uses T. ]

Date: 2014-03-03.13:52:20

Proposed resolution:

In both section [associative.reqmts] Table 102 and [unord.req], Table 103, make the following text replacements:

Original text, in FDIS Replacement text
T is CopyInsertable into X and CopyAssignable. value_type is CopyInsertable into X, key_type is CopyAssignable, and mapped_type is CopyAssignable (for containers having a mapped_type)
T is CopyInsertable value_type is CopyInsertable
T shall be CopyInsertable value_type shall be CopyInsertable
T shall be MoveInsertable value_type shall be MoveInsertable
T shall be EmplaceConstructible value_type shall be EmplaceConstructible
T object value_type object
Date: 2014-02-15.00:00:00

[ 2014-02-15 post-Issaquah session : move to Resolved ]

AJM to replace this note with a 'Resolved By...' after tracking down the exact sequence of events, but clearly resolved in C++14 DIS.

Date: 2011-09-04.00:00:00

[ 2011-09-04 Pablo Halpern provides improved wording ]

Date: 2011-09-06.13:05:28

[ 2011 Bloomington ]

Not even an exhaustive list of problem locations. No reason to doubt issue.

Pablo agrees to provide wording.

Date: 2011-05-04.00:00:00

(this is basically reopening the first part of issue 2006, as discussed in the thread starting at c++std-lib-30698 )

Section [associative.reqmts]

In Table 102, several uses of T (which means mapped_type here) should be value_type instead. This is almost editorial. For instance:

a_uniq.emplace(args)

Requires: T shall be EmplaceConstructible into X from args.

Effects: Inserts a T object t constructed with std::forward<Args>(args)... if and only if there is no element in the container with key equivalent to the key of t. The bool component of the returned pair is true if and only if the insertion takes place, and the iterator component of the pair points to the element with key equivalent to the key of t.

History
Date User Action Args
2014-03-03 13:52:20adminsetmessages: + msg6888
2014-03-03 13:52:20adminsetstatus: open -> resolved
2011-11-21 23:18:12adminsetmessages: + msg5880
2011-09-06 13:05:28adminsetmessages: + msg5876
2011-09-06 13:05:28adminsetmessages: + msg5875
2011-08-18 12:47:33adminsetmessages: + msg5868
2011-08-18 12:47:33adminsetstatus: new -> open
2011-05-04 00:00:00admincreate