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]

Re: [v3] Fix stringbuf handling of NUL characters


On Tue, Jul 17, 2001 at 02:25:45AM +0200, Carlo Wood wrote:
> On Mon, Jul 16, 2001 at 03:42:00PM -0700, Nathan Myers wrote:
> > Then I was out of the room for a few minutes and they resolved that 
> > s.operator[] should return eos() if its argument was s.size(), and
> > all that care went out the window.  
> 
> I object!  Who decided that?  Is the Standard demanding that?
> Ridiculous.

Yep, [21.3.4]/1.  At least it's only the const version that must do this,
but I don't think we take advantage of that fact.  (Doing so would make
the implementation tricky, methinks.)

This is one of those times I wish we made more changes in --enable-debug.
Say, checking char* args to the basic_string ctors for NULL (not required
by the IS), and only tacking on the charT() to the end of the data storage
in debug mode.  (Okay, okay, it's no longer conforming, I know...)


Phil

-- 
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC


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