mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Merge pull request #199 from matus-chochlik/master
Added explicit cast to size_type in span constructor
This commit is contained in:
commit
e5c76a68e0
@ -1267,7 +1267,7 @@ public:
|
||||
&& std::is_convertible<DataType (*)[], value_type (*)[]>::value
|
||||
&& std::is_same<std::decay_t<decltype(std::declval<Cont>().size(), *std::declval<Cont>().data())>, DataType>::value>
|
||||
>
|
||||
constexpr span (Cont& cont) : span(static_cast<pointer>(cont.data()), details::newBoundsHelper<bounds_type>(cont.size()))
|
||||
constexpr span (Cont& cont) : span(static_cast<pointer>(cont.data()), details::newBoundsHelper<bounds_type>(static_cast<size_type>(cont.size())))
|
||||
{}
|
||||
|
||||
constexpr span(const span &) = default;
|
||||
|
Loading…
Reference in New Issue
Block a user