Here is another trick that I learned for Stephan Lavavej’s posts on reddit.
How can you work around those evil lowercase min and max macros that Microsoft
defines, so that you can use the std::min and std::max template functions?
Well, it turns out that you can put parentheses around them. Not beautiful, but it works.
1 2 3 | |
Obviously, the best solution is to define NOMINMAX in your precompiled headers file.
1
| |