Use std::numeric_limit instead of macros