In the C++ Standard Library the value std::numeric_limits<T>::max()
is specified as a function. Further properties of a specific type are given as constants (likestd::numeric_limits<T>::is_signed
). All constants that are of type T
are given as functions, whereas all other constants are given as, well, constant values.
What's the rationale behind that?
See Question&Answers more detail:os