diff --git a/include/fmt/format.h b/include/fmt/format.h index 1a05db312e361..ad8a9426130cf 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -83,7 +83,9 @@ # if FMT_CPLUSPLUS >= 202002L # if FMT_HAS_CPP_ATTRIBUTE(no_unique_address) # define FMT_NO_UNIQUE_ADDRESS [[no_unique_address]] -# elif FMT_MSC_VERSION >= 1929 // VS2019 v16.10 and later +// VS2019 v16.10 and later except clang-cl (https://reviews.llvm.org/D110485) +# elif __has_cpp_attribute(msvc::no_unique_address) || \ + ((FMT_MSC_VERSION >= 1929) && !FMT_CLANG_VERSION) # define FMT_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] # endif # endif @@ -3178,8 +3180,10 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp value, } if (buf[0] == overflow) { buf[0] = '1'; - if ((flags & dragon::fixed) != 0) buf.push_back('0'); - else ++exp10; + if ((flags & dragon::fixed) != 0) + buf.push_back('0'); + else + ++exp10; } return; }