Title
Should string::substr forward the allocator to the newly created string?
Status
nad
Section
[string.substr]
Submitter
Igor Zhukov

Created on 2022-08-10.00:00:00 last changed 24 months ago

Messages

Date: 2022-11-30.00:00:00

[ 2022-11-30 LWG telecon. Status changed: Tentatively NAD → NAD. ]

Date: 2022-08-15.00:00:00

[ 2022-08-24; Reflector poll ]

Set status to Tentatively NAD after reflector poll.

"If you want to provide a different allocator, you can use the substring constructor."

"This matches the constructor, whose choice of allocator has been already considered in 2402. Any changes here need a paper."

Date: 2022-08-10.00:00:00

Adrian Vogelsgesang noticed that libcxx's string::substr forward the allocator to the newly created string.

Nikolas Klauser found that MSVC STL does the same thing.

While Casey Carter and we all agree that this is a bug and we will fix it, we've "always" been nonconforming here and it's weird though that there was never an issue filed and two implementations have the exact same change.

So we want a clarification from LWG.

History
Date User Action Args
2022-11-30 17:59:24adminsetmessages: + msg13139
2022-08-24 18:53:49adminsetmessages: + msg12709
2022-08-24 18:53:49adminsetstatus: new -> nad
2022-08-10 00:00:00admincreate