I want to use #define NOMINMAX
in my Visual Studio C++ project using MFC, so that I can use std::min
and std::max
. However, when I put this line in my stdafx.h, I get following compile error:
c:\program files (x86)\windows kits\8.0\include\um\GdiplusTypes.h(475): error C3861: 'min': identifier not found
I am not using GDI+ intentionally, this is something MFC must be doing. Can the issue be fixed somehow, either by removing the GDI+, or by adjusting it to compile?