Merge remote-tracking branch 'refs/remotes/Microsoft/master'

This commit is contained in:
Vladislav Yaroslavlev 2015-11-12 10:47:49 +03:00
commit a29ed61a48
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ This repo contains Microsoft's implementation of GSL.
The library includes types like `span<T>`, `string_span`, `owner<>` and others.
The entire implementation is provided inline in the headers under the [include](./include) directory.
The entire implementation is provided inline in the headers under the [include](./include) directory. The implementation generally assumes a platform that implements C++14 support. There are specific workarounds to support MSVC 2013 and 2015.
While some types have been broken out into their own headers (e.g. [include/span.h](./include/span.h)),
it is simplest to just include [gsl.h](./include/gsl.h) and gain access to the entire library.

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()));
}
//