bastring.h -- compare
Koos Vriezen
koos@polder.ubc.kun.nl
Mon Jun 22 04:57:00 GMT 1998
Hi,
Is there any progress in making string::compare compatible with the C++
working paper?
> FYI, there's an inconsistency between the definitions of
> bastring compare in egcs 1.0 and in the November 96 working paper:
> >From egcs:
>
> int compare (const basic_string& str, size_type pos = 0, size_type n =
npos) const;
> // There is no 'strncmp' equivalent for charT pointers.
> int compare (const charT* s, size_type pos, size_type n) const;
> int compare (const charT* s, size_type pos = 0) const
> { return compare (s, pos, traits::length (s)); }
> >From the working paper:
>
> int compare(const basic_string& str) const;
> int compare(size_type pos1, size_type n1,
> const basic_string& str) const;
> int compare(size_type pos1, size_type n1,
> const basic_string& str,
> size_type pos2, size_type n2) const;
> int compare(const charT* s) const;
> int compare(size_type pos1, size_type n1,
> const charT* s, size_type n2 = npos) const;
>
> Bob Sidebotham
Cheers Koos Vriezen
More information about the Gcc-bugs
mailing list