
27 May
2004
27 May
'04
2:38 p.m.
From: Toon Knapen <toon.knapen@fft.be>
Jonathan Wakely wrote:
Can it be persuaded to do so? Maybe it ignores the cast to size_type and uses an int because -1 will fit in an int, in which case maybe this would make it use a bigger type:
enum npos_type { npos = -1UL }
nope, does not work.
I'm not surprised. The original code cast -1 to size_type, an unsigned type. The above makes npos a negative integral value which probably doesn't always interact correctly elsewhere. -- Rob Stewart stewart@sig.com Software Engineer http://www.sig.com Susquehanna International Group, LLP using std::disclaimer;