3 ms·
Out of curiosity... did you ever fall into the trap of using numeric_limits<T>::min() instead of numeric_limits<T>::lowest() ? Because I did.
by secondcoming 6y ago
Out of curiosity... did you ever fall into the trap of using
numeric_limits<T>::min()
instead of
numeric_limits<T>::lowest()
? Because I did.
- saagarjha 6y agoThe distinction is only relevant for floating point types, is it not?
- secondcoming 6y agoYes, I believe so.
- SloopJon 6y agoYeah, min() returns the most negative int, so it seems like it should do the same for float. Then the float with the least magnitude could have been, say, smallest().