Was my decision to make lowerlimit
lowerlimit
and upperlimitupperlimit
public the correct one?
Since lowerlimitlowerlimit
and upperlimitupperlimit
are only written by constructor. you can make then const. So even though they are public access, still safe.
Did I handle the implementation of numeric_limits::lowest()
numeric_limits<T>::lowest()
correctly?
You are right. For float, double, they are symmetrical in sign. the lowest for float and double are:
float -FLT_MAX
double -DBL_MAX