This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Default constructed stringbufs and stringstreams


Nathan Myers wrote:

I believe that the design of stringbuf is under review for the next
standard. Probably the requirement that it be in an unusable state
upon creation will be relaxed.


I see... However, I disagree with "unusable": having the get/put pointers
null upon creation by the default-constructor has no negative implications
for the behavior of the streambuf inlines. Also, "fixing" this problem would
bring consistency with a default constructed filebuf and doesn't make the
code more complex, I gonna show you a patch later today...

Moreover, forgot about the initial motivation ;), we could avoid using
_M_string.capacity() in the tests on top os seekoff/seekpos, something
definitely *not* non-zero-room-in-a-default-constructed-string friendly...

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]