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

Error compiling fmtlib 6.2.0 with Intel's Compiler (2020 - v19.1) in C++14 or C++17 modes #1628

Closed
ghost opened this issue Apr 10, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 10, 2020

Hello! I've been using fmtlib (6.2.0) successfully in C++17 mode with clang, gcc, and MSVC. However, I just tried using Intel's compilers (v19.1) and ran into significant errors.

If I try to build the test code from the fmtlib repo as is, the code builds fine in C++11 mode.

When I switch to either C++14 or C++17 mode, I get the errors (I just set CMAKE_CXX_STANDARD to 14 or 17) in this gist: https://gist.github.com/InnerPortal/db52fcebf16bb49fe50303ace24a9c24

On further investigation, looks like the problem is with use of (relaxed) constexpr. It looks like Intel supports extended constexpr in v19, but for some reason fails to build when FMT_USE_CONSTEXPR is set to on and FMT_CONSTEXPR is set to constexpr.

Changing the test for FMT_USE_CONSTEXPR in core.h to exclude the Intel compilers allows the code to compile. Works for me, for now, but I can't tell if there's a better way to solve this problem.

Thanks!

@vitaut
Copy link
Contributor

vitaut commented Apr 11, 2020

Changing the test for FMT_USE_CONSTEXPR in core.h to exclude the Intel compilers allows the code to compile.

I think it's a reasonable workaround. Could you submit a PR?

@vitaut
Copy link
Contributor

vitaut commented Apr 16, 2020

Should be worked around in 6e8d7e2.

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