Skip to content

Commit a4d5770

Browse files
committed
Fix narrowing conversion warning in struct fstring
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.
1 parent e9eaa27 commit a4d5770

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/fmt/base.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2634,7 +2634,7 @@ inline auto runtime(string_view s) -> runtime_format_string<> { return {{s}}; }
26342634
/// A compile-time format string.
26352635
template <typename... T> struct fstring {
26362636
private:
2637-
static constexpr int num_static_named_args =
2637+
static constexpr size_t num_static_named_args =
26382638
detail::count_static_named_args<T...>();
26392639

26402640
using checker = detail::format_string_checker<

0 commit comments

Comments
 (0)