Skip to content

Commit

Permalink
Resolved warning C4127: conditional expression is constant
Browse files Browse the repository at this point in the history
  • Loading branch information
matt77hias committed Apr 7, 2024
1 parent 4e8640e commit 910e696
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -2812,7 +2812,11 @@ template <typename T, typename Char, type TYPE> struct native_formatter {
FMT_CONSTEXPR auto parse(ParseContext& ctx) -> const Char* {
if (ctx.begin() == ctx.end() || *ctx.begin() == '}') return ctx.begin();
auto end = parse_format_specs(ctx.begin(), ctx.end(), specs_, ctx, TYPE);
if (TYPE == type::char_type) check_char_specs(specs_);
if
#if defined(__cpp_if_constexpr)
constexpr
#endif
(TYPE == type::char_type) check_char_specs(specs_);
return end;
}

Expand Down

0 comments on commit 910e696

Please sign in to comment.