Fix sign conversion

This commit is contained in:
Florin Iucha 2018-12-15 12:45:26 -05:00
parent fd510b7507
commit 924d26113e
2 changed files with 2 additions and 2 deletions

View File

@ -377,7 +377,7 @@ struct formatter<std::chrono::duration<Rep, Period>, Char> {
-> decltype(ctx.begin()) {
auto begin = ctx.begin(), end = ctx.end();
end = parse_chrono_format(begin, end, internal::chrono_format_checker());
format_str = basic_string_view<Char>(&*begin, end - begin);
format_str = basic_string_view<Char>(&*begin, static_cast<size_t>(end - begin));
return end;
}

View File

@ -122,7 +122,7 @@ struct formatter<std::tm, Char> {
auto end = it;
while (end != ctx.end() && *end != '}')
++end;
tm_format.reserve(end - it + 1);
tm_format.reserve(static_cast<size_t>(end - it + 1));
tm_format.append(it, end);
tm_format.push_back('\0');
return end;