I was reading this:
when I saw two sentences that make no sense to me towards the end.
this function never throws exceptions.
vs.
If str does not point to a valid C-string, or if the converted value would be out of the range of values representable by an int, it causes undefined behavior.
If the behavior of a bad parse is undefined, doesn't that mean all bets are off, and it's entirely possible for an exception to be raised? Or does this mean "undefined except that the runtime promises not to throw an exception"?
Aucun commentaire:
Enregistrer un commentaire