This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD Arrays status.

### 2254. [arrays.ts] Is `dynarray` an allocator-aware container?

Section: 99 [arrays.ts::container.requirements.general] Status: NAD Arrays Submitter: Jonathan Wakely Opened: 2013-04-23 Last modified: 2016-10-31

Priority: 3

View all issues with NAD Arrays status.

Discussion:

Addresses: arrays.ts

99 [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.

[2013-09 Chicago]

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

[2014-06-06 pre-Rapperswill]

This issue has been reopened as arrays-ts.

Proposed resolution:

1. Change to 99 [arrays.ts::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.