Merge pull request #942 from tjs137/patch-1

use `narrow_cast`
This commit is contained in:
Jordan Maples [MSFT] 2020-10-26 10:06:20 -07:00 committed by GitHub
commit 9fa2c5d5b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,7 +61,7 @@ namespace gsl
{ {
// [views.constants], constants // [views.constants], constants
constexpr const std::size_t dynamic_extent = static_cast<std::size_t>(-1); constexpr const std::size_t dynamic_extent = narrow_cast<std::size_t>(-1);
template <class ElementType, std::size_t Extent = dynamic_extent> template <class ElementType, std::size_t Extent = dynamic_extent>
class span; class span;