Fix/implement C++2020 compilation, tests, and CI (#1017)
* Fix C++20 bugs and tests * Rework CI for C++2020 tests * Update readme compiler versions
This commit is contained in:
1 parent
e0880931ae
commit
bcf008ae55
12 files changed
+80
-67
No files matched your search
+3
-3
@@ -143,10 +143,10 @@ GSL_SUPPRESS(bounds.1) // NO-FORMAT: attribute
|
||||
|
||||
#if defined(__cpp_lib_span) && __cpp_lib_span >= 202002L
|
||||
template <class T, size_t extent = std::dynamic_extent>
|
||||
constexpr auto at(std::span<T, extent> sp, const index i)
|
||||
constexpr auto at(std::span<T, extent> sp, const index i) -> decltype(sp[sp.size()])
|
||||
{
|
||||
Expects(i >= 0 && i < narrow_cast<i>(sp.size()));
|
||||
return sp[i];
|
||||
Expects(i >= 0 && i < narrow_cast<index>(sp.size()));
|
||||
return sp[gsl::narrow_cast<size_t>(i)];
|
||||
}
|
||||
#endif // __cpp_lib_span >= 202002L
|
||||
} // namespace gsl
|
||||
|
||||
Reference in new issue
Block a user