mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Cast size_type for string_span ctor from container.
This commit is contained in:
parent
76d465a3ce
commit
fc289930ee
@ -138,7 +138,7 @@ basic_string_span<T, dynamic_range> ensure_z(T(&sz)[N]) { return ensure_z(&sz[0]
|
|||||||
template<class Cont>
|
template<class Cont>
|
||||||
basic_string_span<typename std::remove_pointer<typename Cont::pointer>::type, dynamic_range> ensure_z(Cont& 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()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user