Skip to content

Commit

Permalink
Remove static_cast<bool>
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <[email protected]>
  • Loading branch information
phprus committed Aug 6, 2023
1 parent c36cdd0 commit 12002b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fmt/std.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ struct formatter<BitRef, Char,
template <typename FormatContext>
FMT_CONSTEXPR auto format(const BitRef& v, FormatContext& ctx) const
-> decltype(ctx.out()) {
return formatter<bool, Char>::format(static_cast<bool>(v), ctx);
return formatter<bool, Char>::format(v, ctx);
}
};

Expand All @@ -431,7 +431,7 @@ struct formatter<std::__bit_const_reference<C>, Char> : formatter<bool, Char> {
template <typename FormatContext>
FMT_CONSTEXPR20 auto format(const std::__bit_const_reference<C>& v,
FormatContext& ctx) const -> decltype(ctx.out()) {
return formatter<bool, Char>::format(static_cast<bool>(v), ctx);
return formatter<bool, Char>::format(v, ctx);
}
};

Expand Down

0 comments on commit 12002b9

Please sign in to comment.