From 17e372c155bb9e71981f42c42349cb7947eac817 Mon Sep 17 00:00:00 2001 From: "Jordan Maples [MSFT]" <49793787+JordanMaples@users.noreply.github.com> Date: Mon, 3 Feb 2020 13:45:56 -0800 Subject: [PATCH 1/3] Update include/gsl/span Co-Authored-By: Casey Carter --- include/gsl/span | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gsl/span b/include/gsl/span index b060113..1483762 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -25,7 +25,7 @@ #include // for array #include // for ptrdiff_t, size_t, nullptr_t #include // for reverse_iterator, distance, random_access_... -#include // for std::addressof +#include // for std::addressof #include #include // for enable_if_t, declval, is_convertible, inte... #include From 9bb900e834ba915f2a2f3abbfc4b5ef3828236d6 Mon Sep 17 00:00:00 2001 From: "Jordan Maples [MSFT]" <49793787+JordanMaples@users.noreply.github.com> Date: Mon, 3 Feb 2020 13:46:18 -0800 Subject: [PATCH 2/3] Update include/gsl/span Co-Authored-By: Casey Carter --- include/gsl/span | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gsl/span b/include/gsl/span index 1483762..e96d644 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -475,7 +475,7 @@ public: typename details::calculate_subspan_type::type { Expects((size() >= Offset) && - (Count == dynamic_extent || (Offset + Count <= size()))); + (Count == dynamic_extent || (Count <= size() - Offset))); return {data() + Offset, Count == dynamic_extent ? size() - Offset : Count}; } From a430823b43bc32f51022fe16fc23d6325dfe5fce Mon Sep 17 00:00:00 2001 From: "Jordan Maples [MSFT]" <49793787+JordanMaples@users.noreply.github.com> Date: Mon, 3 Feb 2020 13:47:34 -0800 Subject: [PATCH 3/3] Update include/gsl/string_span Co-Authored-By: Casey Carter --- include/gsl/string_span | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/gsl/string_span b/include/gsl/string_span index a1d2bb2..fc0dfeb 100644 --- a/include/gsl/string_span +++ b/include/gsl/string_span @@ -26,7 +26,7 @@ #include // for size_t, nullptr_t #include // for PTRDIFF_MAX #include -#include // for basic_string, allocator, char_traits +#include // for basic_string, allocator, char_traits #include // for declval, is_convertible, enable_if_t, add_... #if defined(_MSC_VER) && !defined(__clang__)