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
497
stars
41
forks
source link
Review span in face of p1024 and Tristan Brindle's span implementation #14
Closed
martinmoene closed 5 years ago
References:
Plan:
empty()
as [[nodiscard]] (p1024)operator()
for element access (p1024)detail
.span_CONFIG_PROVIDE...
tospan_FEATURE...
.span_CONFIG_CONTRACT_CHECK()
tospan_CONTRACT_CHECK()
.span_FEATURE_MEMBER_BACK_FRONT
,span_FEATURE_MEMBER_SWAP
.span_HAVE_*
are defined.contract_violation
, functionreport_contract_violation(....)
: throw, or terminate.span_CONFIG_CONTRACT_CHECK
for contract-violation-terminates, issue #15.span_constexpr_exp
: constexpr (elided), or span_constexpr14.span_constexpr_ens
: constexpr (elided), or span_constexpr14.front()
,back()
at(index_type)
.first()
,last()
andsubspan()
.index_type
to be unsigned/size_t
(p1089), see #21Deferred to issue #30:
defined(__cpp_deduction_guides)
etc.Extent
to be unsigned withdynamic_extent
numeric_limits<index_type>::max()
(p1089)?