[libc++][span] Add failing tests for span::first and span::last
Both methods have compile time constraints that we should test against.
Patch by Michael Schellenberger Costa
Differential Revision: https://reviews.llvm.org/D71999
[[maybe_unused]]autos1=sp.first<5>();// expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Count out of range in span::first()"}}
}
// Count numeric_limits
{
[[maybe_unused]]autos1=sp.first<std::size_t(-1)>();// expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Count out of range in span::first()"}}
[[maybe_unused]]autos1=sp.last<5>();// expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Count out of range in span::last()"}}
}
// Count numeric_limits
{
[[maybe_unused]]autos1=sp.last<std::size_t(-1)>();// expected-error-re@span:* {{static_assert failed{{( due to requirement '.*')?}} "Count out of range in span::last()"}}