This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Open status.
Section: 22.214.171.124 [string.require] Status: Open Submitter: Robert Shearer Opened: 2012-04-13 Last modified: 2016-12-23
View all other issues in [string.require].
View all issues with Open status.
In C++11, basic_string is not described as a "container", and is not governed by the allocator-aware container semantics described in sub-clause 21.2 [container.requirements]; as a result, and requirements or contracts for the basic_string interface must be documented in Clause 20 [strings].Sub-clause 126.96.36.199.8 [string.swap] defines the swap member function with no requirements, and with guarantees to execute in constant time without throwing. Fulfilling such a contract is not reasonable in the presence of unequal non-propagating allocators. In contrast, 21.2.1 [container.requirements.general] p7 declares the behavior of member swap for containers with unequal non-propagating allocators to be undefined. Resolution proposal: Additional language from Clause 21 [containers] should probably be copied to Clause 20 [strings]. I will refrain from an exactly recommendation, however, as I am raising further issues related to the language in Clause 21 [containers].
[2013-03-15 Issues Teleconference]
Moved to Open.
Alisdair has offered to provide wording.
Telecon notes that 21.2.1 [container.requirements.general]p13 says that string is an allocator-aware container.