From da75d0e7577aa01d3e307a6454ab500002d73b23 Mon Sep 17 00:00:00 2001 From: Matus Chochlik Date: Wed, 18 Nov 2015 17:43:59 +0100 Subject: [PATCH] Added explicit cast to size_type in span constructor This silences implicit sign conversion warnings when constructing span from containers which return size_t from size(). --- include/span.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/span.h b/include/span.h index 7fd711c..8a406ee 100644 --- a/include/span.h +++ b/include/span.h @@ -1267,7 +1267,7 @@ public: && std::is_convertible::value && std::is_same().size(), *std::declval().data())>, DataType>::value> > - constexpr span (Cont& cont) : span(static_cast(cont.data()), details::newBoundsHelper(cont.size())) + constexpr span (Cont& cont) : span(static_cast(cont.data()), details::newBoundsHelper(static_cast(cont.size()))) {} constexpr span(const span &) = default;