Skip to content

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

Closed
@ghost

Description

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions