2050. Unordered associative containers do not use allocator_traits to define member types

Section: 26.5 [unord] Status: C++14 Submitter: Tom Zieberman Opened: 2011-04-29 Last modified: 2016-02-10

Priority: Not Prioritized

View all other issues in [unord].

View all issues with C++14 status.

Discussion:

The unordered associative containers define their member types reference, const_reference, pointer, const_pointer in terms of their template parameter Allocator (via allocator_type typedef). As a consequence, only the allocator types, that provide sufficient typedefs, are usable as allocators for unordered associative containers, while other containers do not have this deficiency. In addition to that, the definitions of said typedefs are different from ones used in the other containers. This is counterintuitive and introduces a certain level of confusion. These issues can be fixed by defining pointer and const_pointer typedefs in terms of allocator_traits<Allocator> and by defining reference and const_reference in terms of value_type as is done in the other containers.

[ 2011 Bloomington. ]

Move to Ready.

Proposed resolution:

This wording is relative to the FDIS.