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 in os-inl.h min/max on Windows #1302

Closed
mmakhalaf opened this issue Nov 6, 2019 · 3 comments
Closed

Compiler error in os-inl.h min/max on Windows #1302

mmakhalaf opened this issue Nov 6, 2019 · 3 comments

Comments

@mmakhalaf
Copy link

This looks similar to #1251 and #902

This issue also manifests itself when using std::numeric_limits<>::max / min() . This is causing an issue in details/os-inl.h for us, but I can see that it's in sinks/syslog_sink.h and sinks/systemd_sink.h as well as a few other fmt files.

@gabime
Copy link
Owner

gabime commented Nov 6, 2019

please provide the full error log from the compiler

@mmakhalaf
Copy link
Author

1>d:\dev.10.0\externallibs\spdlog\include\spdlog\details\os-inl.h(429): warning C4003: not enough actual parameters for macro 'max'
1>d:\dev.10.0\externallibs\spdlog\include\spdlog\details\os-inl.h(429): error C2589: '(': illegal token on right side of '::'
1>d:\dev.10.0\externallibs\spdlog\include\spdlog\details\os-inl.h(429): error C2059: syntax error: '::'
1>d:\dev.10.0\externallibs\spdlog\include\spdlog\details\os-inl.h(429): error C2143: syntax error: missing '(' before '::'
1>d:\dev.10.0\externallibs\spdlog\include\spdlog\details\os-inl.h(430): error C2143: syntax error: missing ';' before '{'

We have min / max defined as macros by Windows (and enforced by us). We have the SPDLOG_WCHAR_TO_UTF8_SUPPORT flag also.

@gabime gabime closed this as completed in 844d54d Nov 8, 2019
@gabime
Copy link
Owner

gabime commented Nov 8, 2019

Fixed. (I hope, please verify)

The systemd/syslog sinks are not available under Winows anyway.

gabime added a commit that referenced this issue Nov 9, 2019
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