From a4cbd92d98e7a80067cbdb9c9e104f64eefbf123 Mon Sep 17 00:00:00 2001 From: Alexey Ochapov Date: Sun, 8 Nov 2020 03:35:37 +0300 Subject: [PATCH] fix implicit sign conversion warning for clang with std=c++17 --- include/fmt/compile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/compile.h b/include/fmt/compile.h index db562ce4..6863bbae 100644 --- a/include/fmt/compile.h +++ b/include/fmt/compile.h @@ -515,7 +515,7 @@ constexpr parse_specs_result parse_specs(basic_string_view str, auto ctx = basic_format_parse_context(str, {}, arg_id + 1); auto f = formatter(); auto end = f.parse(ctx); - return {f, pos + (end - str.data()) + 1, ctx.next_arg_id()}; + return {f, pos + static_cast(end - str.data()) + 1, ctx.next_arg_id()}; } // Compiles a non-empty format string and returns the compiled representation