#My custom int parser can't handle std::numeric_limits<T>::min()

19 messages · Page 1 of 1 (latest)

untold stormBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

novel steppe
#

for embedded environments, you can use std::istringstream maybe?

#

These can overflow, and work only when dealing with positive values, fix them

barren cave
novel steppe
#

ez

barren cave
#

its more expensive, no?

#

also stringstream doesnt do validation?

#

i need a boolean back

novel steppe
barren cave
#

AH, yeah no id rather not deal with global error flags

#

errc i guess?

novel steppe
barren cave
#

Unfortunately, iostreams is not for performance-intensive work. The problem is not copying things in memory (copying strings is fast), it's virtual function dispatches, potentially to the tune of several indirect function calls per character.

#

id rather not

#

its more expensive

novel steppe
novel steppe
#

if yes, then fix your loops and integer overflow issues

barren cave
#

I fixed it #1332165041637822485