[patch] bits/string.tcc and testsuite/21_strings/rfind.cc

brent verner brent@rcfile.org
Fri Jun 23 21:20:00 GMT 2000


Attached is a (finally correct) patch to bits/string.tcc that brings
the implementation in conformance with the std (IMNSVO). Also, 
testsuite/21_strings/rfind.cc to verify the new behavior. Please
disregard any earlier comments/patches/crap I sent about this issue...
my brain just came fully back online :)


[with this patch, the following prog...]
#include <string>
#include <iostream>
using namespace std;
int
main()
{
  string a("learning");
  string c;
  for(unsigned i = 0;i<=a.size()+1;++i)
    cout << a.rfind(c,i) << endl;
}

[will output]
0
1
2
3
4
5
6
7
8
8

-- 
Damon Brent Verner
Cracker Jack® Certified Professional
brent@rcfile.org, brent@linux1.org


More information about the Libstdc++ mailing list