Title
[arrays.ts] Is dynarray an allocator-aware container?
Status
open
Section
[container.requirements.general]
Submitter
Jonathan Wakely

Created on 2013-04-23.00:00:00 last changed 120 months ago

Messages

Date: 2014-06-06.21:18:30

Proposed resolution:

  1. Change to [container.requirements.general] p13:

    -13- All of the containers defined in this Clause and in (21.4) except array and dynarray meet the additional requirements of an allocator-aware container, as described in Table 99.

Date: 2014-06-06.00:00:00

[ 2014-06-06 pre-Rapperswill ]

This issue has been reopened as arrays-ts.

Date: 2014-06-06.21:18:30

[ 2013-09 Chicago ]

Move to Deferred. This feature will ship after C++14 and should be revisited then.

Date: 2014-06-07.16:56:56

Addresses: arrays.ts

[container.requirements.general] p3 says:

"All of the containers defined in this Clause and in (21.4) except array meet the additional requirements of an allocator-aware container, as described in Table 99."

Is this true of dynarray? I believe the answer must be no because dynarray has no allocator_type, and morally should be no, so that operations are defined in terms of std::allocator<T>, which p13 says doesn't actually need to be used (which allows the elements to be default-initialized as is intended, rather than "default-inserted into the container" using an allocator.)

The requirement that "each element is constructed with uses-allocator construction" provides roughly equivalent behaviour to the "CopyInsertable into X" requirements for allocator-aware containers, allowing an allocator to control construction of the dynarray elements.

History
Date User Action Args
2014-06-06 21:18:30adminsetmessages: + msg6990
2014-06-06 21:18:30adminsetstatus: deferred -> open
2013-09-26 18:26:05adminsetmessages: + msg6636
2013-09-26 18:26:05adminsetstatus: new -> deferred
2013-05-20 17:45:50adminsetmessages: + msg6520
2013-04-23 00:00:00admincreate