This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.
Section: 24.2.2.1 [container.requirements.general] Status: C++17 Submitter: Billy O'Neal III Opened: 2016-11-09 Last modified: 2017-07-30
Priority: 0
View other active issues in [container.requirements.general].
View all other issues in [container.requirements.general].
View all issues with C++17 status.
Discussion:
Addresses US 146
An allocator-aware contiguous container must require an allocator whose pointer type is a contiguous iterator. Otherwise, functions like data for basic_string and vector do not work correctly, along with many other expectations of the contiguous guarantee. Suggested resolution: Add a second sentence to 24.2.2.1 [container.requirements.general] p13:An allocator-aware contiguous container requires allocator_traits<Allocator>::pointer is a contiguous iterator.
[2016-11-12, Issaquah]
Sat PM: Move to 'Tentatively Ready'
Proposed resolution:
This wording is relative to N4606.
In 16.4.4.6 [allocator.requirements]/5, edit as follows:
-5- An allocator type X shall satisfy the requirements of CopyConstructible (17.6.3.1). The X::pointer, X::const_pointer, X::void_pointer, and X::const_void_pointer types shall satisfy the requirements of NullablePointer (17.6.3.3). No constructor, comparison operator, copy operation, move operation, or swap operation on these pointer types shall exit via an exception. X::pointer and X::const_pointer shall also satisfy the requirements for a random access iterator (
25.3 [iterator.requirements]25.3.5.7 [random.access.iterators]) and of a contiguous iterator (25.3.1 [iterator.requirements.general]).