VS2010 projects using min/max functions can be built successfully, while in VS2015 it will keep printing build error: