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++ Core » FIX: UPP::Scan returns int64 for INT_V
Re: FIX: UPP::Scan returns int64 for INT_V [message #32021 is a reply to message #32019] Sun, 17 April 2011 21:23 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14266
Registered: November 2005
Ultimate Member
kohait00 wrote on Sun, 17 April 2011 08:57


but then, the problem should be solved in EditInt, because, at most, there, one could expect to have a true int value returned. but it is not easy, since EditInt is a EditMinMax<> typedef.



One should not. int/int64/double/bool are "poly" types, convertible one to each other. ValueTo is just implementation thing. You are expected to use automatic casts with Value wherever possible, not ValueTo. This is how things are designed, end of story. Coding is easier this way, as you do not have to care about exact type when not necessarry.

BTW, you have also to think about more complex context like Sql, where in fact the number type might not be known until the actual data is fetched from DB.

(Having said that, perhaps we would not really need both EditInt and EditInt64, but that is another story...)

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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: Rect_<T>::SetNull not correct for Rectf (Rect_<double>)
Next Topic: Ptr improve
Goto Forum:
  


Current Time: Fri Jul 18 07:34:02 CEST 2025

Total time taken to generate the page: 0.03377 seconds