Section: 188.8.131.52 [stringbuf.cons] Status: New Submitter: Marshall Clow Opened: 2017-08-02 Last modified: 2017-11-09
View other active issues in [stringbuf.cons].
View all other issues in [stringbuf.cons].
View all issues with New status.
Consider the following constructor from 184.108.40.206 [stringbuf.cons] before p3:
explicit basic_stringbuf( const basic_string<charT, traits, Allocator>& s, ios_base::openmode which = ios_base::in | ios_base::out);
In [stringbuf.cons]/3, it says:
Effects: Constructs an object of class basic_stringbuf, initializing the base class with basic_streambuf() (220.127.116.11), and initializing mode with which. Then calls str(s).
But that doesn't mention where the allocator for the basic_stringbuf comes from. Until recently, most implementations just default constructed the allocator. But that requires that the allocator be default constructible.This bug was filed against libc++ for this case. I think that the basic_stringbuf should be constructed with a copy of the allocator from the string.
[2017-11-01, Marshall comments]
There exist two related proposals, namely P0407R1 and P0408R2.
[2017-11 Albuquerque Wednesday night issues processing]
Priority set to 3