Make return type of basic_format_args::max_size() consistent.

This squashes nasty narrowing conversion warnings.
This commit is contained in:
Daniela Engert 2018-12-01 17:57:34 +01:00 committed by Victor Zverovich
parent 29352af369
commit e7e2ab1070

View File

@ -1279,9 +1279,10 @@ class basic_format_args {
return arg;
}
unsigned max_size() const {
size_type max_size() const {
unsigned long long max_packed = internal::max_packed_args;
return is_packed() ? max_packed : types_ & ~internal::is_unpacked_bit;
return static_cast<size_type>(
is_packed() ? max_packed : types_ & ~internal::is_unpacked_bit);
}
};