Closed martinmoene closed 5 years ago
p0122 - span: bounds-safe views for sequences of objects
See also Reddit: 2018 San Diego ISO C++ Committee Trip Report.
See also 2019-02 Kona ISO C++ Committee Trip Report.
Plan:
index_type
span::ssize()
std::ssize()
std::size()
size(spn), ssize(spn)
In namespace nonstd::span_lite:
namespace nonstd { namespace span_lite { template< class T, extent_t Extent /*= dynamic_extent*/ > span_constexpr std::size_t size( span<T,Extent> const & spn ) { return static_cast<std::size_t>( spn.size() ); } template< class T, extent_t Extent /*= dynamic_extent*/ > span_constexpr std::ptrdiff_t ssize( span<T,Extent> const & spn ) { return static_cast<std::ptrdiff_t>( spn.size() ); } }} // namespace namespace nonstd { using span_lite::size; using span_lite::ssize; }
p0122 - span: bounds-safe views for sequences of objects
See also Reddit: 2018 San Diego ISO C++ Committee Trip Report.
See also 2019-02 Kona ISO C++ Committee Trip Report.
Plan:
index_type
unsigned, see issue #21;span::ssize()
method to get the size of a container as a signed value; p1227: Signed size() functionsstd::ssize()
free function to get the size of a container as a signed value; p1227: Signed size() functionsstd::size()
free function to get the size of a container as an usigned value; n4017: Non-member size() and moresize(spn), ssize(spn)
In namespace nonstd::span_lite: