martinmoene / span-lite

span lite - A C++20-like span for C++98, C++11 and later in a single-file header-only library
Boost Software License 1.0
499 stars 43 forks source link

Use std::size_t for the extent_t #46

Closed ThePhD closed 5 years ago

ThePhD commented 5 years ago

This pull request aligns with the current standard for span and uses std::size_t for the extent type. It also updates the constraint on the constructor which checked for <= 0, which should instead be == dynamic_extent. Fixes #45.

Tested with MinGW 9.2.0 and Latest Visual Studio. Look okay?

ThePhD commented 5 years ago

I also changed index_type to size_type, since that was also changed in the Standard as well (in Belfast they accepted https://wg21.link/p1872).