This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bastring.h -- compare
- To: egcs-bugs at cygnus dot com
- Subject: Re: bastring.h -- compare
- From: Koos Vriezen <koos at polder dot ubc dot kun dot nl>
- Date: Mon, 22 Jun 1998 13:56:45 +0200 (MET DST)
- cc: rns at fore dot com
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