Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » string[] causes many overload complaints
Re: string[] causes many overload complaints [message #20256 is a reply to message #20224] Thu, 05 March 2009 12:29 Go to previous message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
I can imagine offsets needed, but:
1) I rarely need them
2) they work well even when they are declared as unsigned, and it doesn't hurt my mind to do things like index += unsigned(-1);, actually it hurts much less then having to do NTL[int(unsigned_index)] every time I have to work with container value.

Quote:

Where can you see a problem with that?


It's purely matter of taste?
Except saving 1 compare when boundary checking with unsigned, and having 2*max_range (both of them I like much more then signed offsets), I don't see any major difference between those two, so I never really bothered and I can see why Mirek insists on his way.
I'm just adding the int(..) casting when the compiler yells, for me personally it's not even worth to add unsigned variants into NTL, because I don't run into thing that often.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Linking problem with socket
Next Topic: n-State Button
Goto Forum:
  


Current Time: Tue May 14 15:50:41 CEST 2024

Total time taken to generate the page: 0.03200 seconds