mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Merge remote-tracking branch 'refs/remotes/Microsoft/master'
This commit is contained in:
commit
a29ed61a48
@ -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 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)),
|
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.
|
it is simplest to just include [gsl.h](./include/gsl.h) and gain access to the entire library.
|
||||||
|
@ -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