Skip to content

Commit

Permalink
Fix FMT_NO_UNIQUE_ADDRESS warning with clang-cl.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukester1975 committed Aug 20, 2023
1 parent af1b768 commit b5da2db
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 FMT_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
Expand Down Expand Up @@ -3178,8 +3180,10 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> 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;
}
Expand Down

0 comments on commit b5da2db

Please sign in to comment.