From 612747a5e1174760d71f0564a55eb4761375c709 Mon Sep 17 00:00:00 2001 From: Gary Furnish Date: Tue, 4 Oct 2016 21:13:18 -0600 Subject: [PATCH] For span, fix size_t to index_type conversion warning. Use narrow per discussion instead of static_cast. --- gsl/span | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gsl/span b/gsl/span index a9a3322..62b63de 100644 --- a/gsl/span +++ b/gsl/span @@ -392,7 +392,7 @@ public: std::is_convertible::value && std::is_convertible().data())>::value>> - constexpr span(Container& cont) : span(cont.data(), cont.size()) + constexpr span(Container& cont) : span(cont.data(), narrow(cont.size())) { } @@ -402,7 +402,7 @@ public: std::is_convertible::value && std::is_convertible().data())>::value>> - constexpr span(const Container& cont) : span(cont.data(), cont.size()) + constexpr span(const Container& cont) : span(cont.data(), narrow(cont.size())) { }