Section: 18.104.22.168 [string.require] Status: Open Submitter: Robert Shearer Opened: 2012-04-13 Last modified: 2016-11-12
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 26.2 [container.requirements]; as a result, and requirements or contracts for the basic_string interface must be documented in Clause 24 [strings].Sub-clause 22.214.171.124.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, 26.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 26 [containers] should probably be copied to Clause 24 [strings]. I will refrain from an exactly recommendation, however, as I am raising further issues related to the language in Clause 26 [containers].
[2013-03-15 Issues Teleconference]
Moved to Open.
Alisdair has offered to provide wording.
Telecon notes that 26.2.1 [container.requirements.general]p13 says that string is an allocator-aware container.