c++/3745: bug in basic_string.tcc

Phil Edwards pedwards@disaster.jaj.com
Sat Jul 21 16:36:00 GMT 2001


The following reply was made to PR c++/3745; it has been noted by GNATS.

From: Phil Edwards <pedwards@disaster.jaj.com>
To: alm@iis.fhg.de
Cc: gcc-gnats@gcc.gnu.org, spz@iis.fhg.de
Subject: Re: c++/3745: bug in basic_string.tcc
Date: Sat, 21 Jul 2001 19:32:16 -0400

 On Fri, Jul 20, 2001 at 09:04:42AM -0000, alm@iis.fhg.de wrote:
 > >Severity:       serious
 > >Description:
 > On line 630 of the basic_string.tcc file:
 >   __pos = std::min(__size - __n ,__pos);
 > 
 > should be:
 >  __pos = min(__size - __n ,__pos);
 > 
 > since the entire block is in the "namespace std {" scope.
 > This can lead to a compilation error.
 
 Perhaps I'm being dense, but I do not see how.  I have tried to make this
 function call fail to compile, but cannot.  Please give an example of such
 source code, showing why this is "serious".
 
 We could probably remove "std::" just to make it match with the rest of the
 file, but I would want to know why the qualifier is there in the first place.
 
 
 Thanks,
 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



More information about the Gcc-prs mailing list