mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
address build failures
This commit is contained in:
parent
b81d6e40e1
commit
d8fa68c4a5
@ -430,7 +430,7 @@ public:
|
||||
constexpr span(pointer firstElem, pointer lastElem) noexcept
|
||||
: storage_(firstElem, static_cast<std::size_t>(std::distance(firstElem, lastElem)))
|
||||
{
|
||||
if (Extent != dynamic_extent) { Expects(lastElem - firstElem == Extent); }
|
||||
if (Extent != dynamic_extent) { Expects(lastElem - firstElem == static_cast<difference_type>(Extent)); }
|
||||
}
|
||||
|
||||
template <std::size_t N>
|
||||
|
@ -1550,10 +1550,10 @@ TEST(span_test, from_array_constructor)
|
||||
|
||||
// even when done dynamically
|
||||
{
|
||||
span<int> s = arr;
|
||||
/*
|
||||
// this now results in a compile-time error, rather than runtime.
|
||||
// There is no suitable conversion from dynamic span to fixed span.
|
||||
span<int> s = arr;
|
||||
auto f = [&]() {
|
||||
const span<int, 2> s2 = s;
|
||||
static_cast<void>(s2);
|
||||
|
Loading…
Reference in New Issue
Block a user