I have class struct definition as follows:
#include <limits>
struct heapStatsFilters
{
heapStatsFilters(size_t minValue_ = 0, size_t maxValue_ = std::numeric_limits<size_t>::max())
{
minMax[0] = minValue_; minMax[1] = maxValue_;
}
size_t minMax[2];
};
The problem is that I cannot use 'std::numeric_limits::max()' and the compiler says:
Error 8 error C2059: syntax error : '::'
Error 7 error C2589: '(' : illegal token on right side of '::'
The compiler which I am using is Visual C++ 11 (2012)
See Question&Answers more detail:os