You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is very likely to be the fault of Clang, but perhaps something can be done to work around it.
I'm using the official Windows build of LLVM 10.0.0 from a Visual Studio 2017 x64 environment. Calling any formatting function (even something trivial like fmt::print("");) results in the linker error above. This seems to be because Clang mishandles 128 bit integers and incorrectly generates a call to a function not implemented by the Microsoft runtime.
I was able to work around the issue with the following patch:
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 336d2c67..5e5b87dd 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -759,8 +759,7 @@ using uint32_or_64_or_128_t =
// represent all values of T.
template <typename T>
using uint32_or_64_or_128_t = conditional_t<
- num_bits<T>() <= 32, uint32_t,
- conditional_t<num_bits<T>() <= 64, uint64_t, uint128_t>>;
+ num_bits<T>() <= 32, uint32_t, uint64_t>;
#endif
I've tried defining FMT_REDUCE_INT_INSTANTIATIONS to 1, but with that it fails to compile due to an ambiguous call:
..\ext\fmt\include\fmt/format-inl.h(639,5): error: call to member function 'multiply' is ambiguous
multiply(uint32_or_64_or_128_t<Int>(value));
^~~~~~~~
..\ext\fmt\include\fmt/format-inl.h(566,8): note: candidate function
void multiply(uint32_t value) {
^
..\ext\fmt\include\fmt/format-inl.h(577,8): note: candidate function
void multiply(uint64_t value) {
The text was updated successfully, but these errors were encountered:
This is very likely to be the fault of Clang, but perhaps something can be done to work around it.
I'm using the official Windows build of LLVM 10.0.0 from a Visual Studio 2017 x64 environment. Calling any formatting function (even something trivial like
fmt::print("");
) results in the linker error above. This seems to be because Clang mishandles 128 bit integers and incorrectly generates a call to a function not implemented by the Microsoft runtime.I was able to work around the issue with the following patch:
I've tried defining FMT_REDUCE_INT_INSTANTIATIONS to 1, but with that it fails to compile due to an ambiguous call:
The text was updated successfully, but these errors were encountered: