
Please don't take offense when I say this, but "for historical reasons" set off my alarm for sloppy code. I don't claim to know C++ or Boost better than others here so if there is a better valid reason please enlighten me. If there is no way to have a negative index (this is not an array, after all..), why give the option? Doing things the wrong way just because thats how they were done before isn't good. I almost didn't reply for fear of setting off an arrogant developer. Not saying you are one of them, but there are an unfortunate amount in the OSS community and I have stepped on enough toes to learn. On Tue, 2 Nov 2004 10:57:14 -0000, John Maddock <john@johnmaddock.co.uk> wrote:
this will cause compile warnings in VC7.1 with the "detect 64bit issues" flag set:
boost::match_results<string::const_iterator> what; for(boost::match_results<string::const_iterator>::size_type i=0; i<what.size(); i++) results.push_back(string(what[i].first, what[i].second));
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data
it seems the operator takes an int for index instead of size_type.
For historical reasons a negative index is permitted - so for now I'm not going to change this to a size_type argument - although if there's any other way to suppress the warning I'll happily use it.
John.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Cory Nelson http://www.int64.org