Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSVC confuse std::max with windows max macros #13

Open
howard-scu opened this issue Oct 21, 2016 · 0 comments
Open

MSVC confuse std::max with windows max macros #13

howard-scu opened this issue Oct 21, 2016 · 0 comments

Comments

@howard-scu
Copy link

howard-scu commented Oct 21, 2016

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()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant