Skip to content

Commit

Permalink
Fix narrowing conversion warning in struct fstring
Browse files Browse the repository at this point in the history
Warning C4267: 'initializing': conversion from 'size_t' to 'const int',
possible loss of data.

Client applications fail to compile if warnings are treated as errors.
  • Loading branch information
sergio-nsk committed Oct 21, 2024
1 parent e9eaa27 commit a4d5770
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -2634,7 +2634,7 @@ inline auto runtime(string_view s) -> runtime_format_string<> { return {{s}}; }
/// A compile-time format string.
template <typename... T> struct fstring {
private:
static constexpr int num_static_named_args =
static constexpr size_t num_static_named_args =
detail::count_static_named_args<T...>();

using checker = detail::format_string_checker<
Expand Down

0 comments on commit a4d5770

Please sign in to comment.