3

Lets say I have this:

#include <Windows.h>
#include <limits>

void main() {
    float x = std::numeric_limits<float>::max();
}

This doesn't work due to the windows header having a max macro.

Is there a way to get around it without undefining the macro? Like some alternative way to call or some syntax candy for just that one instance?

user81993
  • 6,167
  • 6
  • 32
  • 64

0 Answers0