Skip to content

Commit 34ed7a1

Browse files
shuffle2Zopolis4
authored andcommitted
fmt: fix 'unused variable' warnings
1 parent 2722022 commit 34ed7a1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Externals/fmt/include/fmt/core.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1702,24 +1702,24 @@ template <typename Context, typename T>
17021702
FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value<Context> {
17031703
const auto& arg = arg_mapper<Context>().map(std::forward<T>(val));
17041704

1705-
constexpr bool formattable_char =
1705+
[[maybe_unused]] constexpr bool formattable_char =
17061706
!std::is_same<decltype(arg), const unformattable_char&>::value;
17071707
static_assert(formattable_char, "Mixing character types is disallowed.");
17081708

1709-
constexpr bool formattable_const =
1709+
[[maybe_unused]] constexpr bool formattable_const =
17101710
!std::is_same<decltype(arg), const unformattable_const&>::value;
17111711
static_assert(formattable_const, "Cannot format a const argument.");
17121712

17131713
// Formatting of arbitrary pointers is disallowed. If you want to output
17141714
// a pointer cast it to "void *" or "const void *". In particular, this
17151715
// forbids formatting of "[const] volatile char *" which is printed as bool
17161716
// by iostreams.
1717-
constexpr bool formattable_pointer =
1717+
[[maybe_unused]] constexpr bool formattable_pointer =
17181718
!std::is_same<decltype(arg), const unformattable_pointer&>::value;
17191719
static_assert(formattable_pointer,
17201720
"Formatting of non-void pointers is disallowed.");
17211721

1722-
constexpr bool formattable =
1722+
[[maybe_unused]] constexpr bool formattable =
17231723
!std::is_same<decltype(arg), const unformattable&>::value;
17241724
static_assert(
17251725
formattable,

Externals/fmt/include/fmt/format.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2198,7 +2198,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& fp,
21982198
-> OutputIt {
21992199
auto significand = fp.significand;
22002200
int significand_size = get_significand_size(fp);
2201-
constexpr Char zero = static_cast<Char>('0');
2201+
static constexpr Char zero = static_cast<Char>('0');
22022202
auto sign = fspecs.sign;
22032203
size_t size = to_unsigned(significand_size) + (sign ? 1 : 0);
22042204
using iterator = reserve_iterator<OutputIt>;

0 commit comments

Comments
 (0)