c++/3745: bug in basic_string.tcc

alm@iis.fhg.de alm@iis.fhg.de
Fri Jul 20 02:06:00 GMT 2001


>Number:         3745
>Category:       c++
>Synopsis:       bug in basic_string.tcc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 20 02:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     alm@iis.fhg.de
>Release:        unknown-1.0
>Organization:
>Environment:
Linux SuSE 7.2
>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. Furthermore, all other calls
to the "min" template are made without the namespace "std::" 
identifier.
>How-To-Repeat:

>Fix:
Just remove "std::" on line 630
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list