This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] Default constructed stringbufs and stringstreams
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Nathan Myers <ncm-nospam at cantrip dot org>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 29 Sep 2004 10:43:48 +0200
- Subject: Re: [RFC] Default constructed stringbufs and stringstreams
- References: <4159F926.5040507@suse.de> <20040929063147.GG23819@tofu.dreamhost.com>
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.