From d8fa68c4a589e6461c4bb2a58d5ccc1c1075b5ef Mon Sep 17 00:00:00 2001 From: "Jordan Maples [MSFT]" <49793787+JordanMaples@users.noreply.github.com> Date: Fri, 7 Feb 2020 14:40:09 -0800 Subject: [PATCH] address build failures --- include/gsl/span | 2 +- tests/span_tests.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/gsl/span b/include/gsl/span index 445826c..20f4237 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -430,7 +430,7 @@ public: constexpr span(pointer firstElem, pointer lastElem) noexcept : storage_(firstElem, static_cast(std::distance(firstElem, lastElem))) { - if (Extent != dynamic_extent) { Expects(lastElem - firstElem == Extent); } + if (Extent != dynamic_extent) { Expects(lastElem - firstElem == static_cast(Extent)); } } template diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp index 8c5ac0d..1f5020b 100644 --- a/tests/span_tests.cpp +++ b/tests/span_tests.cpp @@ -1550,10 +1550,10 @@ TEST(span_test, from_array_constructor) // even when done dynamically { - span s = arr; /* // this now results in a compile-time error, rather than runtime. // There is no suitable conversion from dynamic span to fixed span. + span s = arr; auto f = [&]() { const span s2 = s; static_cast(s2);