This line of code fails to compile in VS2015 Update 3:
auto a = std::numeric_limits<long long>::max();
max call may interfere with "evil"
max preprocessor macro defined in the Windows SDK headers, that you have probably included (directly or indirectly).
An option is to prevent the preprocessor
max macro to kick in, using an additional pair of parentheses:
... = (std::numeric_limits<long long>::max)();
As an additional option, you may consider
#define #NOMINMAX before including Windows headers. This will prevent the definition of the aforementioned
max preprocessor macros.
However, note that some Windows headers (like the GDI+ ones) do require the Win32's
max preprocessor macros, so in such cases the use of an additional pair of parentheses may be a better option.