C++ 我可以退出(取消)C预处理器宏扩展吗
我使用了以下代码:C++ 我可以退出(取消)C预处理器宏扩展吗,c++,preprocessor,C++,Preprocessor,我使用了以下代码: auto t = numeric_limits<decltype(m)>::max() - 1; auto t=numeric_limits::max()-1; 后来,我需要#包含#定义max(a,b)指令的,:max()方法在调用:max()时,有没有一种方法可以在不使用#undef max的情况下抑制宏扩展?在编译器选项中或在包含windows之前定义NOMINMAX。h: #define NOMINMAX #include <windows.h&g
auto t = numeric_limits<decltype(m)>::max() - 1;
auto t=numeric_limits::max()-1;
后来,我需要
#包含#定义max(a,b)
指令的,:max()
方法在调用:max()
时,有没有一种方法可以在不使用#undef max
的情况下抑制宏扩展?在编译器选项中或在包含windows之前定义NOMINMAX
。h:
#define NOMINMAX
#include <windows.h>
#定义NOMINMAX
#包括