Thanks to visit codestin.com
Credit goes to github.com

Skip to content

FMT_ATTACH_TO_GLOBAL_MODULE does not compile with clang #4081

@kamrann

Description

@kamrann

There appear to be two independent issues:

  1. os.h:386:16: error: declaration of 'buffer_size' with internal linkage cannot be exported. constexpr implying internal linkage has an exception for module interface units, but it seems when enclosed within extern "C++" clang ceases to apply this exception. I suspect clang is probably wrong here and fmt/MSVC are correct, but not 100% sure. I filed an issue with LLVM.
  2. error: declaration of 'assert_fail' in module fmt follows declaration in the global module. This one I suspect is more likely to be clang being correct and fmt/MSVC wrong to permit it, but again unsure. clang seems to want the definitions of things previously declared within extern "C++" to also be within such a block.

So it's possible there is no error here on fmt's side, but from experience, with two discrepancies between MSVC and clang, MSVC being on the correct side of both is unlikely!

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