Just a brief collection of other answers.
If max(a,b) is already #defined, (by including windows.h or some Windows-related project, etc.)
#define NOMINMAX
#undef max
(std::max) - Use parentheses to prevent function-like macro1)
std::max<int> - Explicitly give a type for the template.
Precaution: If some part of the project depends on the min/max macro, e.g. using MFC, then just simply doing #define NOMINMAX can cause some problem.
Maybe #undef NOMINMAX should be needed, e.g.:
// just an example
#define NOMINMAX
#include <windows.h>
#undef NOMINMAX
// ...
(For more info, please take a look at the answers of this question.)
1) Function-like macros only expand when the next thing after is an opening parenthesis. When surrounding the name with parentheses, the next thing after the name is a closing parenthesis, so no expansion occurs. [ref]