error: Too few arguments provided to function-like macro invocation
error: Assigning to 'char' from incompatible type 'short () noexcept'
解决方法:(std::numeric_limits::max)()
原因:Windef.h中定义了
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
#endif
所以会产生编译错误
参考文献:std::numeric_limits::max() std::numeric_limits::min()编译错误