This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++14 status.
2308. Clarify container destructor requirements w.r.t.std::array
Section: 23.2.2 [container.requirements.general] Status: C++14 Submitter: Jonathan Wakely Opened: 2013-09-26 Last modified: 2017-07-05
Priority: 0
View other active issues in [container.requirements.general].
View all other issues in [container.requirements.general].
View all issues with C++14 status.
Discussion:
It has been suggested that Table 96 — "Container requirements" makes confusing requirements for the destructor of std::array
:
a
; all the memory is deallocated." Since std::array
obtains no memory, there is none to deallocate, arguably making it unclear what the requirement means for std::array::~array()
.
[Issaquah 2014-02-11: Move to Immediate]
Proposed resolution:
This wording is relative to N3691.
Change in 23.2.2 [container.requirements.general], Table 96 — "Container requirements", the "Assertion/note/pre-/post-condition" for the expression "(&a)->~X()
" as indicated:
note: the destructor is applied to every element of
a
; all the any memory obtained is deallocated.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4