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
>Originator:     alm@iis.fhg.de
>Release:        unknown-1.0
Linux SuSE 7.2
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::" 

Just remove "std::" on line 630

More information about the Gcc-bugs mailing list