aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gsl/span4
1 files 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<typename Container::pointer, pointer>::value &&
std::is_convertible<typename Container::pointer,
decltype(std::declval<Container>().data())>::value>>
- constexpr span(Container& cont) : span(cont.data(), cont.size())
+ constexpr span(Container& cont) : span(cont.data(), narrow<index_type>(cont.size()))
{
}
@@ -402,7 +402,7 @@ public:
std::is_convertible<typename Container::pointer, pointer>::value &&
std::is_convertible<typename Container::pointer,
decltype(std::declval<Container>().data())>::value>>
- constexpr span(const Container& cont) : span(cont.data(), cont.size())
+ constexpr span(const Container& cont) : span(cont.data(), narrow<index_type>(cont.size()))
{
}