TankOs/SFGUI — Issue #124: std::max and MSVC++
Author: eXpl0it3r
Created: 2012-01-23 15:08:54+00:00
State: open

While compiling the [newst release](https://github.com/TankOs/SFGUI/commit/899d94a994944ba75a20c5a253aefde811ccd1fd) with MSVC++ it spit out some error on line 668 of Renderer.cpp.
It was because of the std::max function and so I googled quickly and found this post: http://www.devx.com/tips/Tip/14540

It seems the min and max templates get overwritten with a stupid
#define max(a,b) (((a)>(b))?(a):(b))
which somehow doesn't work with the written code. (Note: If you enter it by hand, loosing the precompiler advantage, it does compile)

The fix/workaround would be to define NOMINMAX or just replace it.