mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
[span] fix size_t to index_type conversion warning
This commit is contained in:
commit
32ca283d53
4
gsl/span
4
gsl/span
@ -392,7 +392,7 @@ public:
|
|||||||
std::is_convertible<typename Container::pointer, pointer>::value &&
|
std::is_convertible<typename Container::pointer, pointer>::value &&
|
||||||
std::is_convertible<typename Container::pointer,
|
std::is_convertible<typename Container::pointer,
|
||||||
decltype(std::declval<Container>().data())>::value>>
|
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, pointer>::value &&
|
||||||
std::is_convertible<typename Container::pointer,
|
std::is_convertible<typename Container::pointer,
|
||||||
decltype(std::declval<Container>().data())>::value>>
|
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()))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user