Title
Missing requirements for allocator pointers
Status
c++17
Section
[container.requirements.general]
Submitter
Billy O'Neal III

Created on 2016-11-09.00:00:00 last changed 82 months ago

Messages

Date: 2016-11-21.05:09:01

Proposed resolution:

This wording is relative to N4606.

  1. In [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 ([iterator.requirements][random.access.iterators]) and of a contiguous iterator ([iterator.requirements.general]).

Date: 2016-11-15.00:00:00

[ 2016-11-12, Issaquah ]

Sat PM: Move to 'Tentatively Ready'

Date: 2016-11-09.21:53:48

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 [container.requirements.general] p13:

An allocator-aware contiguous container requires allocator_traits<Allocator>::pointer is a contiguous iterator.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2017-03-05 23:41:16adminsetstatus: ready -> wp
2016-11-21 05:09:01adminsetmessages: + msg8672
2016-11-21 05:09:01adminsetstatus: new -> ready
2016-11-09 21:27:40adminsetmessages: + msg8595
2016-11-09 00:00:00admincreate