Title
Error in description of string::compare()
Status
dup
Section
[string.swap]
Submitter
Nico Josuttis

Created on 1998-09-29.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

Duplicate: 5

Date: 1998-09-29.00:00:00

The following compare() description is obviously a bug:

int compare(size_type pos, size_type n1, 
            charT *s, size_type n2 = npos) const;

because without passing n2 it should compare up to the end of the string instead of comparing npos characters (which throws an exception)

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg200
1998-09-29 00:00:00admincreate