cmdline
cmdline copied to clipboard
MSVC confuse std::max with windows max macros
when i compiled cmdline in vs2016, i got the following error
1>cmdline.h(586) : error C2589: '(' : illegal token on right side of '::'
1>cmdline.h(586) : error C2143: syntax error : missing ';' before '::'
the solution is to use
max_width = (std::max)(max_width, (ordered[i]->name().length()));
to instead the line
max_width = std::max(max_width, (ordered[i]->name().length()));