From 670ffbeb1133caff2f95db3834824c379aa9b0a8 Mon Sep 17 00:00:00 2001 From: Neil MacIntosh Date: Wed, 11 Nov 2015 10:37:43 -0800 Subject: [PATCH 1/2] Added note regarding C++14 support requirements. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e84a82..5743bb3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This repo contains Microsoft's implementation of GSL. The library includes types like `span`, `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. From fc289930ee37a5bd34bf7198fc30948f455cc2f3 Mon Sep 17 00:00:00 2001 From: Neil MacIntosh Date: Wed, 11 Nov 2015 20:48:42 -0800 Subject: [PATCH 2/2] Cast size_type for string_span ctor from container. --- include/string_span.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/string_span.h b/include/string_span.h index 68095fa..7194c85 100644 --- a/include/string_span.h +++ b/include/string_span.h @@ -138,7 +138,7 @@ basic_string_span ensure_z(T(&sz)[N]) { return ensure_z(&sz[0] template basic_string_span::type, dynamic_range> ensure_z(Cont& cont) { - return ensure_z(cont.data(), cont.length()); + return ensure_z(cont.data(), static_cast(cont.length())); } //