#include #include int foo = std::numeric_limits::max();
However I found a few ways to make it work:
// 1#include #include int foo = (std::numeric_limits<int>::max)();// 2#define NOMINMAXinclude #include int foo = std::numeric_limits<int>::max();// 3#include #undef max#include int foo = std::numeric_limits<int>::max();// 4#include #include int foo = INT_MAX;
Yuck to C macros.