It requests you to change the line to this one:
const Scalar dwarf = (std::numeric_limits<Scalar>::min)();
So that if min
function-like macro is defined, it will not be substituted.
The problem is that Microsoft Windows headers define the min
macro, so standard C++ code that includes Windows headers may fail to compile. The solution that portable C++ libraries implement is wrapping their calls to the standard min
functions with parentheses, as above. The test code that you compile seems to check that this technique is used by the code.
The problem of the above approach is that you will not be able to perform an unqualified call to min(a,b)
with argument dependent lookup, since adding parentheses causes the name to be looked up independent of the arguments.
Another solution that one can apply to her own code is to define the NOMINMAX flag before including any Windows header or undefining the min
/max
macros. This is not usually done by library code since they are not supposed to tweak the configuration of the user code.