Hi,
In a template function, I like to determine the range for the value of its template type. For specific type, like int, INT_MAX and INT_MIN are what I want. But how to do the same for a template type?
Thanks and regards!
Hi,
In a template function, I like to determine the range for the value of its template type. For specific type, like int, INT_MAX and INT_MIN are what I want. But how to do the same for a template type?
Thanks and regards!
For numeric types, you can use the std::numeric_limits
class template in the <limits>
header.