#include <algorithm>
#include <vector>
Go to the source code of this file.
Namespaces | |
nonstd | |
nonstd::span_lite | |
nonstd::span_lite::std11 | |
nonstd::span_lite::std17 | |
nonstd::span_lite::std20 | |
nonstd::span_lite::detail | |
Typedefs | |
typedef span_CONFIG_EXTENT_TYPE | nonstd::span_lite::extent_t |
typedef span_CONFIG_SIZE_TYPE | nonstd::span_lite::size_t |
typedef integral_constant< bool, true > | nonstd::span_lite::std11::true_type |
typedef integral_constant< bool, false > | nonstd::span_lite::std11::false_type |
Functions | |
template<typename T > | |
span_constexpr bool | nonstd::span_lite::detail::is_positive (T x) |
span_noreturn void | nonstd::span_lite::detail::report_contract_violation (char const *) span_noexcept |
template<class T > | |
span_constexpr size_t | nonstd::span_lite::to_size (T size) |
template<class T , extent_t Extent> | |
span_constexpr std::size_t | nonstd::span_lite::size (span< T, Extent > const &spn) |
template<class T , extent_t Extent> | |
span_constexpr std::ptrdiff_t | nonstd::span_lite::ssize (span< T, Extent > const &spn) |
Variables | |
span_constexpr const extent_t | nonstd::span_lite::dynamic_extent = static_cast<extent_t>( -1 ) |
const span_constexpr with_container_t | nonstd::span_lite::with_container |
#define span_lite_MAJOR 0 |
Definition at line 14 of file span-lite.hpp.
#define span_lite_MINOR 10 |
Definition at line 15 of file span-lite.hpp.
#define span_lite_PATCH 3 |
Definition at line 16 of file span-lite.hpp.
#define span_lite_VERSION span_STRINGIFY(span_lite_MAJOR) "." span_STRINGIFY(span_lite_MINOR) "." span_STRINGIFY(span_lite_PATCH) |
Definition at line 18 of file span-lite.hpp.
#define span_STRINGIFY | ( | x | ) | span_STRINGIFY_( x ) |
Definition at line 20 of file span-lite.hpp.
#define span_STRINGIFY_ | ( | x | ) | #x |
Definition at line 21 of file span-lite.hpp.
#define span_SPAN_DEFAULT 0 |
Definition at line 25 of file span-lite.hpp.
#define span_SPAN_NONSTD 1 |
Definition at line 26 of file span-lite.hpp.
#define span_SPAN_STD 2 |
Definition at line 27 of file span-lite.hpp.
#define span_HAVE_TWEAK_HEADER 0 |
Definition at line 37 of file span-lite.hpp.
#define span_HAVE | ( | feature | ) | ( span_HAVE_##feature ) |
Definition at line 43 of file span-lite.hpp.
#define span_CONFIG_SELECT_SPAN ( span_HAVE_STD_SPAN ? span_SPAN_STD : span_SPAN_NONSTD ) |
Definition at line 46 of file span-lite.hpp.
#define span_CONFIG_EXTENT_TYPE std::size_t |
Definition at line 50 of file span-lite.hpp.
Referenced by nonstd::span_lite::ssize().
#define span_CONFIG_SIZE_TYPE std::size_t |
Definition at line 54 of file span-lite.hpp.
#define span_FEATURE_WITH_INITIALIZER_LIST_P2447 0 |
Definition at line 64 of file span-lite.hpp.
#define span_FEATURE_WITH_CONTAINER 0 |
Definition at line 71 of file span-lite.hpp.
#define span_FEATURE_WITH_CONTAINER_TO_STD 0 |
Definition at line 72 of file span-lite.hpp.
#define span_FEATURE_CONSTRUCTION_FROM_STDARRAY_ELEMENT_TYPE 0 |
Definition at line 77 of file span-lite.hpp.
#define span_FEATURE_MEMBER_AT 0 |
Definition at line 81 of file span-lite.hpp.
#define span_FEATURE_MEMBER_BACK_FRONT 1 |
Definition at line 85 of file span-lite.hpp.
#define span_FEATURE_MEMBER_CALL_OPERATOR 0 |
Definition at line 89 of file span-lite.hpp.
#define span_FEATURE_MEMBER_SWAP 0 |
Definition at line 93 of file span-lite.hpp.
#define span_FEATURE_NON_MEMBER_FIRST_LAST_SUB 0 |
Definition at line 97 of file span-lite.hpp.
#define span_FEATURE_NON_MEMBER_FIRST_LAST_SUB_SPAN 0 |
Definition at line 104 of file span-lite.hpp.
#define span_FEATURE_NON_MEMBER_FIRST_LAST_SUB_CONTAINER 0 |
Definition at line 108 of file span-lite.hpp.
#define span_FEATURE_COMPARISON 0 |
Definition at line 112 of file span-lite.hpp.
#define span_FEATURE_SAME 0 |
Definition at line 116 of file span-lite.hpp.
#define span_FEATURE_MAKE_SPAN 0 |
Definition at line 127 of file span-lite.hpp.
#define span_FEATURE_MAKE_SPAN_TO_STD 0 |
Definition at line 128 of file span-lite.hpp.
#define span_FEATURE_BYTE_SPAN 0 |
Definition at line 133 of file span-lite.hpp.
#define span_CONFIG_NO_EXCEPTIONS 1 |
Definition at line 145 of file span-lite.hpp.
#define span_CONFIG_CONTRACT_VIOLATION_THROWS 0 |
Definition at line 148 of file span-lite.hpp.
#define span_CONFIG_CONTRACT_VIOLATION_TERMINATES 1 |
Definition at line 149 of file span-lite.hpp.
#define span_CONFIG_CONTRACT_LEVEL_MASK 0x11 |
Definition at line 164 of file span-lite.hpp.
#define span_CONFIG_CONTRACT_VIOLATION_THROWS_V span_CONFIG_CONTRACT_VIOLATION_THROWS |
Definition at line 168 of file span-lite.hpp.
#define span_CPLUSPLUS __cplusplus |
Definition at line 185 of file span-lite.hpp.
#define span_CPP98_OR_GREATER ( span_CPLUSPLUS >= 199711L ) |
Definition at line 189 of file span-lite.hpp.
#define span_CPP11_OR_GREATER ( span_CPLUSPLUS >= 201103L ) |
Definition at line 190 of file span-lite.hpp.
#define span_CPP14_OR_GREATER ( span_CPLUSPLUS >= 201402L ) |
Definition at line 191 of file span-lite.hpp.
#define span_CPP17_OR_GREATER ( span_CPLUSPLUS >= 201703L ) |
Definition at line 192 of file span-lite.hpp.
#define span_CPP20_OR_GREATER ( span_CPLUSPLUS >= 202000L ) |
Definition at line 193 of file span-lite.hpp.
#define span_CPLUSPLUS_V ( span_CPLUSPLUS / 100 - (span_CPLUSPLUS > 200000 ? 2000 : 1994) ) |
Definition at line 197 of file span-lite.hpp.
#define span_IN_STD | ( | v | ) | ( ((v) == 98 ? 3 : (v)) >= span_CPLUSPLUS_V ) |
Definition at line 199 of file span-lite.hpp.
#define span_CONFIG | ( | feature | ) | ( span_CONFIG_##feature ) |
Definition at line 201 of file span-lite.hpp.
#define span_FEATURE | ( | feature | ) | ( span_FEATURE_##feature ) |
Definition at line 202 of file span-lite.hpp.
#define span_FEATURE_TO_STD | ( | feature | ) | ( span_IN_STD( span_FEATURE( feature##_TO_STD ) ) ) |
Definition at line 203 of file span-lite.hpp.
#define span_HAVE_STD_SPAN 0 |
Definition at line 214 of file span-lite.hpp.
#define span_USES_STD_SPAN ( (span_CONFIG_SELECT_SPAN == span_SPAN_STD) || ((span_CONFIG_SELECT_SPAN == span_SPAN_DEFAULT) && span_HAVE_STD_SPAN) ) |
Definition at line 217 of file span-lite.hpp.
#define span_COMPILER_MSVC_VER 0 |
Definition at line 262 of file span-lite.hpp.
#define span_COMPILER_MSVC_VERSION 0 |
Definition at line 263 of file span-lite.hpp.
#define span_COMPILER_VERSION | ( | major, | |
minor, | |||
patch | |||
) | ( 10 * ( 10 * (major) + (minor) ) + (patch) ) |
Definition at line 266 of file span-lite.hpp.
#define span_COMPILER_CLANG_VERSION 0 |
Definition at line 271 of file span-lite.hpp.
#define span_COMPILER_GNUC_VERSION 0 |
Definition at line 277 of file span-lite.hpp.
#define span_BETWEEN | ( | v, | |
lo, | |||
hi | |||
) | ( (lo) <= (v) && (v) < (hi) ) |
Definition at line 281 of file span-lite.hpp.
#define span_RESTORE_WARNINGS | ( | ) | /*empty*/ |
Definition at line 312 of file span-lite.hpp.
Referenced by nonstd::span_lite::ssize().
#define span_HAS_CPP0X 0 |
Definition at line 320 of file span-lite.hpp.
#define span_CPP11_80 (span_CPP11_OR_GREATER || span_COMPILER_MSVC_VER >= 1400) |
Definition at line 323 of file span-lite.hpp.
#define span_CPP11_90 (span_CPP11_OR_GREATER || span_COMPILER_MSVC_VER >= 1500) |
Definition at line 324 of file span-lite.hpp.
#define span_CPP11_100 (span_CPP11_OR_GREATER || span_COMPILER_MSVC_VER >= 1600) |
Definition at line 325 of file span-lite.hpp.
#define span_CPP11_110 (span_CPP11_OR_GREATER || span_COMPILER_MSVC_VER >= 1700) |
Definition at line 326 of file span-lite.hpp.
#define span_CPP11_120 (span_CPP11_OR_GREATER || span_COMPILER_MSVC_VER >= 1800) |
Definition at line 327 of file span-lite.hpp.
#define span_CPP11_140 (span_CPP11_OR_GREATER || span_COMPILER_MSVC_VER >= 1900) |
Definition at line 328 of file span-lite.hpp.
#define span_CPP14_000 (span_CPP14_OR_GREATER) |
Definition at line 330 of file span-lite.hpp.
#define span_CPP14_120 (span_CPP14_OR_GREATER || span_COMPILER_MSVC_VER >= 1800) |
Definition at line 331 of file span-lite.hpp.
#define span_CPP14_140 (span_CPP14_OR_GREATER || span_COMPILER_MSVC_VER >= 1900) |
Definition at line 332 of file span-lite.hpp.
#define span_CPP17_000 (span_CPP17_OR_GREATER) |
Definition at line 334 of file span-lite.hpp.
#define span_HAVE_ALIAS_TEMPLATE span_CPP11_140 |
Definition at line 338 of file span-lite.hpp.
#define span_HAVE_AUTO span_CPP11_100 |
Definition at line 339 of file span-lite.hpp.
#define span_HAVE_CONSTEXPR_11 span_CPP11_140 |
Definition at line 340 of file span-lite.hpp.
#define span_HAVE_DEFAULT_FUNCTION_TEMPLATE_ARG span_CPP11_120 |
Definition at line 341 of file span-lite.hpp.
#define span_HAVE_EXPLICIT_CONVERSION span_CPP11_140 |
Definition at line 342 of file span-lite.hpp.
#define span_HAVE_INITIALIZER_LIST span_CPP11_120 |
Definition at line 343 of file span-lite.hpp.
#define span_HAVE_IS_DEFAULT span_CPP11_140 |
Definition at line 344 of file span-lite.hpp.
#define span_HAVE_IS_DELETE span_CPP11_140 |
Definition at line 345 of file span-lite.hpp.
#define span_HAVE_NOEXCEPT span_CPP11_140 |
Definition at line 346 of file span-lite.hpp.
#define span_HAVE_NULLPTR span_CPP11_100 |
Definition at line 347 of file span-lite.hpp.
#define span_HAVE_STATIC_ASSERT span_CPP11_100 |
Definition at line 348 of file span-lite.hpp.
#define span_HAVE_CONSTEXPR_14 span_CPP14_000 |
Definition at line 352 of file span-lite.hpp.
#define span_HAVE_DEPRECATED span_CPP17_000 |
Definition at line 356 of file span-lite.hpp.
#define span_HAVE_NODISCARD span_CPP17_000 |
Definition at line 357 of file span-lite.hpp.
#define span_HAVE_NORETURN span_CPP17_000 |
Definition at line 358 of file span-lite.hpp.
#define span_HAVE_DEDUCTION_GUIDES (span_CPP17_OR_GREATER && ! span_BETWEEN( span_COMPILER_MSVC_VER, 1, 1913 )) |
Definition at line 365 of file span-lite.hpp.
#define span_HAVE_ADDRESSOF span_CPP17_000 |
Definition at line 370 of file span-lite.hpp.
#define span_HAVE_ARRAY span_CPP11_110 |
Definition at line 371 of file span-lite.hpp.
#define span_HAVE_BYTE span_CPP17_000 |
Definition at line 372 of file span-lite.hpp.
#define span_HAVE_CONDITIONAL span_CPP11_120 |
Definition at line 373 of file span-lite.hpp.
#define span_HAVE_CONTAINER_DATA_METHOD (span_CPP11_140 || ( span_COMPILER_MSVC_VER >= 1500 && span_HAS_CPP0X )) |
Definition at line 374 of file span-lite.hpp.
#define span_HAVE_DATA span_CPP17_000 |
Definition at line 375 of file span-lite.hpp.
#define span_HAVE_LONGLONG span_CPP11_80 |
Definition at line 376 of file span-lite.hpp.
#define span_HAVE_REMOVE_CONST span_CPP11_110 |
Definition at line 377 of file span-lite.hpp.
#define span_HAVE_SNPRINTF span_CPP11_140 |
Definition at line 378 of file span-lite.hpp.
#define span_HAVE_STRUCT_BINDING span_CPP11_120 |
Definition at line 379 of file span-lite.hpp.
#define span_HAVE_TYPE_TRAITS span_CPP11_90 |
Definition at line 380 of file span-lite.hpp.
#define span_HAVE_NONSTD_BYTE 0 |
Definition at line 387 of file span-lite.hpp.
#define span_ADDRESSOF | ( | x | ) | (&x) |
Definition at line 395 of file span-lite.hpp.
Referenced by nonstd::span_lite::span< T, Extent >::span().
#define span_constexpr /*span_constexpr*/ |
Definition at line 401 of file span-lite.hpp.
Referenced by nonstd::span_lite::span< T, Extent >::crend(), nonstd::span_lite::span< T, Extent >::span(), nonstd::span_lite::ssize(), and nonstd::span_lite::with_container_t::with_container_t().
#define span_constexpr14 /*span_constexpr*/ |
Definition at line 407 of file span-lite.hpp.
Referenced by nonstd::span_lite::span< T, Extent >::back(), nonstd::span_lite::span< T, Extent >::operator[](), and nonstd::span_lite::span< T, Extent >::span().
#define span_explicit /*explicit*/ |
Definition at line 413 of file span-lite.hpp.
#define span_is_delete |
Definition at line 419 of file span-lite.hpp.
#define span_is_delete_access private |
Definition at line 425 of file span-lite.hpp.
#define span_noexcept /*noexcept*/ |
Definition at line 431 of file span-lite.hpp.
Referenced by nonstd::span_lite::span< T, Extent >::span(), and nonstd::span_lite::with_container_t::with_container_t().
#define span_nullptr NULL |
Definition at line 437 of file span-lite.hpp.
Referenced by nonstd::span_lite::span< T, Extent >::span(), and nonstd::span_lite::span< T, Extent >::span_REQUIRES_0().
#define span_deprecated | ( | msg | ) | /*[[deprecated]]*/ |
Definition at line 443 of file span-lite.hpp.
Referenced by nonstd::span_lite::span< T, Extent >::operator[]().
#define span_nodiscard /*[[nodiscard]]*/ |
Definition at line 449 of file span-lite.hpp.
#define span_noreturn /*[[noreturn]]*/ |
Definition at line 455 of file span-lite.hpp.
Referenced by nonstd::span_lite::detail::is_positive().
#define span_HAVE_CONSTRAINED_SPAN_CONTAINER_CTOR span_HAVE_DEFAULT_FUNCTION_TEMPLATE_ARG |
Definition at line 460 of file span-lite.hpp.
#define span_HAVE_ITERATOR_CTOR span_HAVE_DEFAULT_FUNCTION_TEMPLATE_ARG |
Definition at line 461 of file span-lite.hpp.
#define span_ELIDE_CONTRACT_EXPECTS ( 0 == ( span_CONFIG_CONTRACT_LEVEL_MASK & 0x01 ) ) |
Definition at line 499 of file span-lite.hpp.
#define span_ELIDE_CONTRACT_ENSURES ( 0 == ( span_CONFIG_CONTRACT_LEVEL_MASK & 0x10 ) ) |
Definition at line 500 of file span-lite.hpp.
#define span_constexpr_exp span_constexpr14 |
Definition at line 506 of file span-lite.hpp.
Referenced by nonstd::span_lite::span< T, Extent >::first(), nonstd::span_lite::span< T, Extent >::last(), nonstd::span_lite::span< T, Extent >::operator[](), nonstd::span_lite::span< T, Extent >::span(), nonstd::span_lite::span< T, Extent >::span_REQUIRES_0(), and nonstd::span_lite::span< T, Extent >::subspan().
#define span_EXPECTS | ( | cond | ) | span_CONTRACT_CHECK( "Precondition", cond ) |
Definition at line 507 of file span-lite.hpp.
Referenced by nonstd::span_lite::span< T, Extent >::back(), nonstd::span_lite::span< T, Extent >::first(), nonstd::span_lite::span< T, Extent >::front(), nonstd::span_lite::span< T, Extent >::last(), nonstd::span_lite::span< T, Extent >::operator[](), nonstd::span_lite::span< T, Extent >::span(), nonstd::span_lite::span< T, Extent >::span_REQUIRES_0(), and nonstd::span_lite::span< T, Extent >::subspan().
#define span_constexpr_ens span_constexpr14 |
Definition at line 514 of file span-lite.hpp.
#define span_ENSURES | ( | cond | ) | span_CONTRACT_CHECK( "Postcondition", cond ) |
Definition at line 515 of file span-lite.hpp.
#define span_CONTRACT_CHECK | ( | type, | |
cond | |||
) |
Definition at line 518 of file span-lite.hpp.
#define span_LOCATION | ( | file, | |
line | |||
) | file "(" span_STRINGIFY( line ) ")" |
Definition at line 525 of file span-lite.hpp.
#define span_REQUIRES_0 | ( | VA | ) | /*empty*/ |
Definition at line 552 of file span-lite.hpp.
#define span_REQUIRES_T | ( | VA | ) | /*empty*/ |
Definition at line 553 of file span-lite.hpp.
Referenced by nonstd::span_lite::span< T, Extent >::crend(), nonstd::span_lite::detail::is_positive(), nonstd::span_lite::span< T, Extent >::operator=(), nonstd::span_lite::span< T, Extent >::span(), and nonstd::span_lite::span< T, Extent >::span_REQUIRES_0().
#define span_REQUIRES_R | ( | R, | |
VA | |||
) | R |
Definition at line 554 of file span-lite.hpp.
#define span_REQUIRES_A | ( | VA | ) | /*empty*/ |
Definition at line 555 of file span-lite.hpp.
#define span_sizeof | ( | T | ) | static_cast<extent_t>( sizeof(T) ) |
Definition at line 868 of file span-lite.hpp.
Referenced by nonstd::span_lite::span< T, Extent >::crend(), and nonstd::span_lite::ssize().