News for hackers. Stuff that matters.
Re:A Special Kind of Hell: intmax_t in C and C++ by secondcoming on Saturday December 05, 2020 @04:29PM (#25318570)
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.
Re:A Special Kind of Hell: intmax_t in C and C++ by saagarjha on Saturday December 05, 2020 @04:35PM (#25318621)
The distinction is only relevant for floating point types, is it not?
Re:A Special Kind of Hell: intmax_t in C and C++ by secondcoming on Sunday December 06, 2020 @08:58AM (#25323478)
Yes, I believe so.
Re:A Special Kind of Hell: intmax_t in C and C++ by SloopJon on Sunday December 06, 2020 @01:36AM (#25321635)
Yeah, 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().