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

Compiler error on windows around use of min #602

Open
maztheman opened this issue Sep 4, 2020 · 1 comment
Open

Compiler error on windows around use of min #602

maztheman opened this issue Sep 4, 2020 · 1 comment

Comments

@maztheman
Copy link

Simple fix is the wrap the word min and max in () such as:

static CONSTCD11 year (min)() NOEXCEPT { return year{-32767}; }
static CONSTCD11 year (max)() NOEXCEPT { return year{32767}; }

Taking from fmtlib's handling of min and max this is the easiest way to fix this issue.

@HowardHinnant
Copy link
Owner

Another good fix is to compile with NOMINMAX defined.

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

2 participants