Closed
Description
I noticed recently that fmt was causing errors and preventing my project from compiling. The stream of errors is very long, but they all stem from
[build] In file included from C:/Users/Kellan/CLionProjects/ortin/modules/fmt/src/os.cc:13:
[build] In file included from C:/Users/Kellan/CLionProjects/ortin/modules/fmt/include\fmt/os.h:20:
[build] C:/Users/Kellan/CLionProjects/ortin/modules/fmt/include\fmt/format.h:935:3: error: unknown type name 'FMT_NO_UNIQUE_ADDRESS'
[build] FMT_NO_UNIQUE_ADDRESS Allocator alloc_;
[build] ^
[build] C:/Users/Kellan/CLionProjects/ortin/modules/fmt/include\fmt/format.h:935:25: warning: declaration of 'Allocator' shadows template parameter [-Wmicrosoft-template-shadow]
[build] FMT_NO_UNIQUE_ADDRESS Allocator alloc_;
[build] ^
[build] C:/Users/Kellan/CLionProjects/ortin/modules/fmt/include\fmt/format.h:929:20: note: template parameter is declared here
[build] typename Allocator = std::allocator<T>>
[build] ^
I bisected and found #3485 was the culprit. There's a couple confusing things about this error.
FMT_NO_UNIQUE_ADDRESS
should be defined. It's further up in the file and my IDE shows it should expand to[[no_unique_address]]
in my environment. For some reason, it's not getting replaced by the preprocessor.- I can't replicate this in Godbolt. It may be that I'm using the GNU command line version of Clang 15.0.1 installed by Visual Studio (not
clang-cl
, theclang.exe
installed with it), which isn't an option.
Metadata
Metadata
Assignees
Labels
No labels