Cast size_type for string_span ctor from container.

This commit is contained in:
Neil MacIntosh 2015-11-11 20:48:42 -08:00
parent 76d465a3ce
commit fc289930ee

View File

@ -138,7 +138,7 @@ basic_string_span<T, dynamic_range> ensure_z(T(&sz)[N]) { return ensure_z(&sz[0]
template<class Cont>
basic_string_span<typename std::remove_pointer<typename Cont::pointer>::type, dynamic_range> ensure_z(Cont& cont)
{
return ensure_z(cont.data(), cont.length());
return ensure_z(cont.data(), static_cast<std::ptrdiff_t>(cont.length()));
}
//