Home » U++ Library support » U++ Library : Other (not classified elsewhere) » string[] causes many overload complaints
Re: string[] causes many overload complaints [message #20234 is a reply to message #20228] |
Mon, 02 March 2009 16:40   |
 |
mirek
Messages: 14262 Registered: November 2005
|
Ultimate Member |
|
|
mr_ped wrote on Mon, 02 March 2009 04:15 |
And AFAIK there's no special use for negative index values in NTL containers, ranges are always from 0, so if I would design the NTL containers, the basic [] operator would work with unsigned type, not signed. Probably breaking the convention of many programmers writing "for (int i=0; i<max; i++)" ... I never care too much about conventions anyway, unless they make sense, and this one does not.
|
Relative offsets can be negative. Obviously, in the end it always ends as positive number, but values involved in computing the index value can be negative. Using 'int' may avoid some casting (or equivalent warnings).
Mirek
|
|
|
Goto Forum:
Current Time: Fri Jun 27 12:46:14 CEST 2025
Total time taken to generate the page: 0.04352 seconds
|