I used intmax_t just yesterday in an ODBC type conversion test. I wrote a template for use in a Google Test typed test to find the highest and lowest values supported by the client and server type. Something like:
max(
static_cast<intmax_t>(
numeric_limits<T>::lowest()),
static_cast<intmax_t>(
numeric_limits<U>::lowest()))
I tried std::common_type first, but it didn't quite do the trick.