if windows.h collide with STL... ...

Started by
10 comments, last by yckx 16 years, 6 months ago
Not all macros work the same. Function-like macros, such as min and max as defined in windows.h are only expanded if they are followed by a parenthetically enclosed parameter list. So max(a, b) will expand the macro, but (std::max)(a, b) will not.
Advertisement
Ah, silly me. I failed to note the parentheses around std::max. I blame my severe nearsightedness ;)

This topic is closed to new replies.

Advertisement