initial impl of P1976R2

This commit is contained in:
Jordan Maples
2020-05-19 16:27:46 -07:00
parent 1999b48a51
commit 2085c7acde
6 changed files with 1267 additions and 1241 deletions
+2 -2
View File
@@ -121,7 +121,7 @@ span<T, dynamic_extent> ensure_sentinel(T* seq,
GSL_SUPPRESS(bounds.1) // NO-FORMAT: attribute // TODO: suppress does not work
while (static_cast<std::size_t>(cur - seq) < max && *cur != Sentinel) ++cur;
Ensures(*cur == Sentinel);
return {seq, static_cast<std::size_t>(cur - seq)};
return span<T>(seq, static_cast<std::size_t>(cur - seq));
}
//
@@ -308,7 +308,7 @@ public:
private:
static impl_type remove_z(pointer const& sz, std::size_t max)
{
return {sz, details::string_length(sz, max)};
return impl_type(sz, details::string_length(sz, max));
}
template <std::size_t N>