{"id":13729563,"url":"https://github.com/martinmoene/span-lite","last_synced_at":"2025-04-12T19:49:31.999Z","repository":{"id":37622979,"uuid":"127560893","full_name":"martinmoene/span-lite","owner":"martinmoene","description":"span lite - A C++20-like span for C++98, C++11 and later in a single-file header-only library","archived":false,"fork":false,"pushed_at":"2024-06-04T08:08:41.000Z","size":406,"stargazers_count":498,"open_issues_count":8,"forks_count":44,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-12T19:49:27.866Z","etag":null,"topics":["cpp11","cpp14","cpp17","cpp20","cpp98","header-only","no-dependencies","single-file","span","span-implementation"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martinmoene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-31T18:43:22.000Z","updated_at":"2025-02-07T06:10:55.000Z","dependencies_parsed_at":"2023-01-22T16:10:21.202Z","dependency_job_id":"a1a3ee51-1473-4f31-a7e5-acc7f1c9499c","html_url":"https://github.com/martinmoene/span-lite","commit_stats":{"total_commits":339,"total_committers":12,"mean_commits":28.25,"dds":"0.053097345132743334","last_synced_commit":"bc08bf87258d881aaa83b50c54dea67ea33d0e8e"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinmoene%2Fspan-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinmoene%2Fspan-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinmoene%2Fspan-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martinmoene%2Fspan-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martinmoene","download_url":"https://codeload.github.com/martinmoene/span-lite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625501,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp11","cpp14","cpp17","cpp20","cpp98","header-only","no-dependencies","single-file","span","span-implementation"],"created_at":"2024-08-03T02:01:02.445Z","updated_at":"2025-04-12T19:49:31.962Z","avatar_url":"https://github.com/martinmoene.png","language":"C++","readme":"\u003ca id=\"top\"\u003e\u003c/a\u003e\n# span lite: A single-file header-only version of a C++20-like span for C++98, C++11 and later\n\n[![Language](https://img.shields.io/badge/C%2B%2B-98/11/14/17/20-blue.svg)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization) [![License](https://img.shields.io/badge/license-BSL-blue.svg)](https://opensource.org/licenses/BSL-1.0) [![Build Status](https://github.com/martinmoene/span-lite/actions/workflows/ci.yml/badge.svg)](https://github.com/martinmoene/span-lite/actions/workflows/ci.yml) [![Build status](https://ci.appveyor.com/api/projects/status/1ha3wnxtam547m8p?svg=true)](https://ci.appveyor.com/project/martinmoene/span-lite) [![Version](https://badge.fury.io/gh/martinmoene%2Fspan-lite.svg)](https://github.com/martinmoene/span-lite/releases) [![download](https://img.shields.io/badge/latest-download-blue.svg)](https://github.com/martinmoene/span-lite/blob/master/include/nonstd/span.hpp) [![Conan](https://img.shields.io/badge/on-conan-blue.svg)](https://conan.io/center/span-lite) [![Vcpkg](https://img.shields.io/badge/on-vcpkg-blue.svg)](https://vcpkg.link/ports/span-lite) [![Try it on wandbox](https://img.shields.io/badge/on-wandbox-blue.svg)](https://wandbox.org/permlink/venR3Ko2Q4tlvcVk) [![Try it on godbolt online](https://img.shields.io/badge/on-godbolt-blue.svg)](https://godbolt.org/z/htwpnb)\n\n**Contents**  \n\n- [Example usage](#example-usage)\n- [In a nutshell](#in-a-nutshell)\n- [License](#license)\n- [Dependencies](#dependencies)\n- [Installation and use](#installation-and-use)\n- [Synopsis](#synopsis)\n- [Reported to work with](#reported-to-work-with)\n- [Building the tests](#building-the-tests)\n- [Other implementations of span](#other-implementations-of-span)\n- [Notes and references](#notes-and-references)\n- [Appendix](#appendix)\n\n## Example usage\n\n```cpp\n#include \"nonstd/span.hpp\"\n#include \u003carray\u003e\n#include \u003cvector\u003e\n#include \u003ciostream\u003e\n\nstd::ptrdiff_t size( nonstd::span\u003cconst int\u003e spn )\n{\n    return spn.size();\n}\n\nint main()\n{\n    int arr[] = { 1, };\n\n    std::cout \u003c\u003c \n        \"C-array:\" \u003c\u003c size( arr ) \u003c\u003c\n        \" array:\"  \u003c\u003c size( std::array \u003cint, 2\u003e{ 1, 2, } ) \u003c\u003c\n        \" vector:\" \u003c\u003c size( std::vector\u003cint   \u003e{ 1, 2, 3, } );\n}\n```\n\n### Compile and run\n\n```bash\nprompt\u003e g++ -std=c++11 -Wall -I../include -o 01-basic.exe 01-basic.cpp \u0026\u0026 01-basic.exe\nC-array:1 array:2 vector:3\n```\n\n## In a nutshell\n\n**span lite** is a single-file header-only library to provide a bounds-safe view for sequences of objects. The library provides a [C++20-like span](http://en.cppreference.com/w/cpp/container/span) for use with C++98 and later. If available, `std::span` is used, unless [configured otherwise](#configuration). *span-lite* can detect the presence of [*byte-lite*](https://github.com/martinmoene/byte-lite) and if present, it provides `as_bytes()` and `as_writable_bytes()` also for C++14 and earlier. \n\n**Features and properties of span lite** are ease of installation (single header), freedom of dependencies other than the standard library. To compensate for the class template argument deduction that is missing from pre-C++17 compilers, `nonstd::span` can provide `make_span` functions. See [configuration](#configuration).\n\n## License\n\n*span lite* is distributed under the [Boost Software License](https://github.com/martinmoene/span-lite/blob/master/LICENSE.txt).\n\n## Dependencies\n\n*span lite* has no other dependencies than the [C++ standard library](http://en.cppreference.com/w/cpp/header).\n\n## Installation and use\n\n*span lite* is a single-file header-only library. Put `span.hpp` in the [include](include) folder directly into the project source tree or somewhere reachable from your project.\n\n## Synopsis\n\n**Contents**  \n[Documentation of `std::span`](#documentation-of-stdspan)  \n[Later additions](#later-additions)  \n[Non-standard extensions](#non-standard-extensions)  \n[Configuration](#configuration)  \n\n## Documentation of `std::span`\n\nDepending on the compiler and C++-standard used, `nonstd::span` behaves less or more like `std::span`. To get an idea of the capabilities of `nonstd::span` with your configuration, look at the output of the [tests](test/span.t.cpp), issuing `span-main.t --pass @`. For `std::span`, see its [documentation at cppreference](http://en.cppreference.com/w/cpp/container/span).  \n\n## Later additions\n\n### `back()` and `front()`\n\n*span lite* can provide `back()` and `front()` member functions for element access. See the table below and section [configuration](#configuration).\n\n## Non-standard extensions\n\n### Construct from std::initializer_list (p2447)\n\n*span lite* can provide construction from a std::initializer_list\u003c\u003e as a constant set of values as proposed in [p2447](https://wg21.link/p2447). See the table below and section [configuration](#configuration).\n\n### Construct from container\n\nTo construct a span from a container with compilers that cannot constrain such a single-parameter constructor to containers, *span lite* provides a constructor that takes an additional parameter of type `with_container_t`. Use `with_container` as value for this parameter. See the table below and section [configuration](#configuration).\n\n### Construct from `std::array` with const data\n\n*span lite* can provide construction of a span from a `std::array` with const data. See the table below and section [configuration](#configuration).\n\n### `operator()`\n\n*span lite* can provide member function call `operator()` for element access. It is equivalent to `operator[]` and has been marked `[[deprecated]]`. Its main purpose is to provide a migration path. \n\n### `at()`\n\n*span lite* can provide member function `at()` for element access. Unless exceptions have been disabled, `at()` throws std::out_of_range if the index falls outside the span. With exceptions disabled, `at(index_t)` delegates bounds checking to `operator[](index_t)`. See the table below and sections [configuration](#configuration) and [disable exceptions](#disable-exceptions).\n\n### `swap()`\n\n*span lite* can provide a `swap()`member function. See the table below and section [configuration](#configuration).\n\n### `operator==()` and other comparison functions\n\n*span lite* can provide functions to compare the content of two spans. However, C++20's span will not provide comparison and _span lite_ will omit comparison at default in the near future. See the table below and section [configuration](#configuration). See also [Revisiting Regular Types](#regtyp).\n\n### `same()`\n\n*span lite* can provide function `same()` to determine if two spans refer as identical spans to the same data via the same type. If `same()` is enabled, `operator==()` incorporates it in its comparison. See the table below and section [configuration](#configuration).\n\n### `first()`, `last()` and `subspan()`\n\n*span lite* can provide functions `first()`, `last()` and `subspan()` to avoid having to use the *dot template* syntax when the span is a dependent type. See the table below and section [configuration](#configuration).\n\n### `make_span()`\n\n*span lite* can provide `make_span()` creator functions to compensate for the class template argument deduction that is missing from pre-C++17 compilers. See the table below and section [configuration](#configuration).\n\n### `byte_span()`\n\n*span lite* can provide `byte_span()` creator functions to represent an object as a span of bytes. This requires the C++17 type `std::byte` to be available. See the table below and section [configuration](#configuration).\n\n| Kind               | std  | Function or method |\n|--------------------|------|--------------------|\n| **Macro**          |\u0026nbsp;| macro **`span_FEATURE_WITH_INITIALIZER_LIST_P2447`** |\n| **Constructor**\u003cbr\u003e\u0026nbsp; |\u0026nbsp;| constexpr explicit **span**( std::initializer_list\u0026lt;value_type\u003e il ) noexcept\u003cbr\u003eexplicit for non-dynamic extent |\n| \u0026nbsp;             |\u0026nbsp;| \u0026nbsp; |\n| **Macro**\u003cbr\u003e\u0026nbsp;|\u0026nbsp;| macro **`span_FEATURE_WITH_CONTAINER`**\u003cbr\u003emacro **`span_FEATURE_WITH_CONTAINER_TO_STD`** |\n| **Types**          |\u0026nbsp;| **with_container_t** type to disambiguate below constructors |\n| **Objects**        |\u0026nbsp;| **with_container** value to disambiguate below constructors |\n| **Constructors**   |\u0026nbsp;| macro **`span_FEATURE_CONSTRUCTION_FROM_STDARRAY_ELEMENT_TYPE`**|\n| \u0026nbsp;             |\u0026nbsp;| template\u0026lt;class Container\u003e\u003cbr\u003econstexpr **span**(with_container_t, Container \u0026 cont) |\n| \u0026nbsp;             |\u0026nbsp;| template\u0026lt;class Container\u003e\u003cbr\u003econstexpr **span**(with_container_t, Container const \u0026 cont) |\n| \u0026nbsp;             |\u0026nbsp;| \u0026nbsp; |\n| **Methods**        |\u0026nbsp;| macro **`span_FEATURE_MEMBER_CALL_OPERATOR`** |\n| \u0026nbsp;             |\u0026nbsp;| constexpr reference **operator()**(index_t idx) const\u003cbr\u003eEquivalent to **operator[]**(), marked `[[deprecated]]` |\n| \u0026nbsp;             |\u0026nbsp;| \u0026nbsp; |\n| **Methods**        |\u0026nbsp;| macro **`span_FEATURE_MEMBER_AT`** |\n| \u0026nbsp;             |\u0026nbsp;| constexpr reference **at**(index_t idx) const\u003cbr\u003eMay throw std::out_of_range exception |\n| \u0026nbsp;             |\u0026nbsp;| \u0026nbsp; |\n| **Methods**        |\u0026nbsp;| macro **`span_FEATURE_MEMBER_BACK_FRONT`** (on since v0.5.0) |\n| \u0026nbsp;             |\u0026nbsp;| constexpr reference **back()** const noexcept  |\n| \u0026nbsp;             |\u0026nbsp;| constexpr reference **front()** const noexcept |\n| \u0026nbsp;             |\u0026nbsp;| \u0026nbsp; |\n| **Method**         |\u0026nbsp;| macro **`span_FEATURE_MEMBER_SWAP`** |\n| \u0026nbsp;             |\u0026nbsp;| constexpr void **swap**(span \u0026 other) noexcept  |\n| \u0026nbsp;             |\u0026nbsp;| \u0026nbsp; |\n| **Free functions** |\u0026nbsp;| macro **`span_FEATURE_COMPARISON`** |\n|\u003cbr\u003e\u003cbr\u003e== != \u003c \u003e \u003c= \u003e= |\u0026nbsp;| template\u0026lt;class T1, index_t E1, class T2, index_t E2\u003e\u003cbr\u003econstexpr bool\u003cbr\u003e**operator==**( span\u003cT1,E1\u003e const \u0026 l, span\u003cT2,E2\u003e const \u0026 r) noexcept |\n| \u0026nbsp;             |\u0026nbsp;| \u0026nbsp; |\n| **Free function**  |\u0026nbsp;| macro **`span_FEATURE_SAME`** |\n| \u0026nbsp;             |\u0026nbsp;| template\u0026lt;class T1, index_t E1, class T2, index_t E2\u003e\u003cbr\u003econstexpr bool\u003cbr\u003e**same**( span\u003cT1,E1\u003e const \u0026 l, span\u003cT2,E2\u003e const \u0026 r) noexcept |\n| \u0026nbsp;             |\u0026nbsp;| \u0026nbsp; |\n| **Free functions**\u003cbr\u003e\u0026nbsp;\u003cbr\u003e\u0026nbsp; |\u0026nbsp;| macros **`span_FEATURE_NON_MEMBER_FIRST_LAST_SUB`**,\u003cbr\u003e**`span_FEATURE_NON_MEMBER_FIRST_LAST_SUB_SPAN`**,\u003cbr\u003e**`span_FEATURE_NON_MEMBER_FIRST_LAST_SUB_CONTAINER`** |\n| \u0026nbsp;             |\u0026nbsp;| \u0026nbsp; |\n| **Free functions** |\u0026nbsp;| macro **`span_FEATURE_NON_MEMBER_FIRST_LAST_SUB_SPAN`** |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;extent_t Count, class T, extent_t Extent\u003e\u003cbr\u003econstexpr span\u0026lt;T,Count\u003e\u003cbr\u003e**first**(span\u0026lt;T,Extent\u003e spn) |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;class T, extent_t Extent \u003e\u003cbr\u003econstexpr span\u0026lt;T\u003e\u003cbr\u003e**first**(span\u0026lt;T,Extent\u003e spn, size_t count) |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;extent_t Count, class T, extent_t Extent\u003e\u003cbr\u003econstexpr span\u0026lt;T,Count\u003e\u003cbr\u003e**last**(span\u0026lt;T,Extent\u003e spn) |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;class T, extent_t Extent \u003e\u003cbr\u003econstexpr span\u0026lt;T\u003e\u003cbr\u003e**last**(span\u0026lt;T,Extent\u003e spn, size_t count) |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;size_t Offset, extent_t Count, class T, extent_t Extent\u003e\u003cbr\u003econstexpr span\u0026lt;T, Count\u003e\u003cbr\u003e**subspan**(span\u0026lt;T, Extent\u003e spn) |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;class T, extent_t Extent\u003e\u003cbr\u003econstexpr span\u0026lt;T\u003e\u003cbr\u003e**subspan**( span\u0026lt;T, Extent\u003e spn, size_t offset, extent_t count = dynamic_extent) |\n| \u0026nbsp;             |\u0026nbsp;| \u0026nbsp; |\n| **Free functions** |\u0026nbsp;| macro **`span_FEATURE_NON_MEMBER_FIRST_LAST_SUB_CONTAINER`** |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;extent_t Count, class T\u003e\u003cbr\u003econstexpr auto\u003cbr\u003e**first**(T \u0026 t) -\u003e... |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;class T\u003e\u003cbr\u003econstexpr auto\u003cbr\u003e**first**(T \u0026 t, index_t count) -\u003e... |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;extent_t Count, class T\u003e\u003cbr\u003econstexpr auto\u003cbr\u003e**last**(T \u0026 t) -\u003e... |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;class T\u003e\u003cbr\u003econstexpr auto\u003cbr\u003e**last**(T \u0026 t, extent_t count) -\u003e... |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;index_t Offset, extent_t Count = dynamic_extent, class T\u003e\u003cbr\u003econstexpr auto\u003cbr\u003e**subspan**(T \u0026 t) -\u003e... |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;class T\u003e\u003cbr\u003econstexpr auto\u003cbr\u003e**subspan**(T \u0026 t, index_t offset, extent_t count = dynamic_extent) -\u003e... |\n| \u0026nbsp; | \u0026nbsp;    | \u0026nbsp; |\n| **Free functions**\u003cbr\u003e\u0026nbsp; |\u0026nbsp;| macro **`span_FEATURE_MAKE_SPAN`**\u003cbr\u003emacro **`span_FEATURE_MAKE_SPAN_TO_STD`** |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;class T\u003e\u003cbr\u003econstexpr span\u0026lt;T\u003e\u003cbr\u003e**make_span**(T \\* first, T \\* last) noexcept |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;class T\u003e\u003cbr\u003econstexpr span\u0026lt;T\u003e\u003cbr\u003e**make_span**(T \\* ptr, index_t count) noexcept |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;class T, size_t N\u003e\u003cbr\u003econstexpr span\u0026lt;T,N\u003e\u003cbr\u003e**make_span**(T (\u0026arr)[N]) noexcept |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;class T, size_t N\u003e\u003cbr\u003econstexpr span\u0026lt;T,N\u003e\u003cbr\u003e**make_span**(std::array\u0026lt;T,N\u003e \u0026 arr) noexcept |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;class T, size_t N\u003e\u003cbr\u003econstexpr span\u0026lt;const T,N\u003e\u003cbr\u003e**make_span**(std::array\u0026lt;T,N \u003e const \u0026 arr) noexcept |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;class T\u003e\u003cbr\u003econstexpr span\u0026lt;T\u003e\u003cbr\u003e**make_span**(std::initializer_list\u0026lt;T\u003e il) noexcept |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;class Container\u003e\u003cbr\u003econstexpr auto\u003cbr\u003e**make_span**(Container \u0026 cont) -\u003e\u003cbr\u003e\u0026emsp;span\u0026lt;typename Container::value_type\u003e noexcept |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;class Container\u003e\u003cbr\u003econstexpr auto\u003cbr\u003e**make_span**(Container const \u0026 cont) -\u003e\u003cbr\u003e\u0026emsp;span\u0026lt;const typename Container::value_type\u003e noexcept |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;class Container\u003e\u003cbr\u003espan\u0026lt;typename Container::value_type\u003e\u003cbr\u003e**make_span**( with_container_t, Container \u0026 cont ) |\n| \u0026nbsp; | \u0026nbsp;    | template\u0026lt;class Container\u003e\u003cbr\u003espan\u0026lt;const typename Container::value_type\u003e\u003cbr\u003e**make_span**( with_container_t, Container const \u0026 cont ) |\n| \u0026nbsp; | \u003c C++11   | template\u0026lt;class T, Allocator\u003e\u003cbr\u003espan\u0026lt;T\u003e\u003cbr\u003e**make_span**(std::vector\u0026lt;T, Allocator\u003e \u0026 cont) |\n| \u0026nbsp; | \u003c C++11   | template\u0026lt;class T, Allocator\u003e\u003cbr\u003espan\u0026lt;const T\u003e\u003cbr\u003e**make_span**(std::vector\u0026lt;T, Allocator\u003e const \u0026 cont) |\n| \u0026nbsp; | \u0026nbsp;    | \u0026nbsp; |                                       \n| **Free functions** |\u0026nbsp;| macro **`span_FEATURE_BYTE_SPAN`** |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;class T\u003e\u003cbr\u003espan\u0026lt;T, sizeof(T)\u003e\u003cbr\u003e**byte_span**(T \u0026 t) |\n| \u0026nbsp; | \u003e= C++11  | template\u0026lt;class T\u003e\u003cbr\u003espan\u0026lt;const T, sizeof(T)\u003e\u003cbr\u003e**byte_span**(T const \u0026 t) |\n\n## Configuration\n\n### Tweak header\n\nIf the compiler supports [`__has_include()`](https://en.cppreference.com/w/cpp/preprocessor/include), *span lite* supports the [tweak header](https://vector-of-bool.github.io/2020/10/04/lib-configuration.html) mechanism. Provide your *tweak header* as `nonstd/span.tweak.hpp` in a folder in the include-search-path. In the tweak header, provide definitions as documented below, like `#define span_CONFIG_NO_EXCEPTIONS 1`.\n\n### Standard selection macro\n\n\\-D\u003cb\u003espan\\_CPLUSPLUS\u003c/b\u003e=199711L  \nDefine this macro to override the auto-detection of the supported C++ standard, if your compiler does not set the `__cplusplus` macro correctly.\n\n### Select `std::span` or `nonstd::span`\n\nAt default, *span lite* uses `std::span` if it is available and lets you use it via namespace `nonstd`. You can however override this default and explicitly request to use `std::span` or span lite's `nonstd::span` as `nonstd::span` via the following macros.\n\n-D\u003cb\u003espan\\_CONFIG\\_SELECT\\_SPAN\u003c/b\u003e=span_SPAN_DEFAULT  \nDefine this to `span_SPAN_STD` to select `std::span` as `nonstd::span`. Define this to `span_SPAN_NONSTD` to select `nonstd::span` as `nonstd::span`. Default is undefined, which has the same effect as defining to `span_SPAN_DEFAULT`.\n\n### Select extent type\n\n-D\u003cb\u003espan_CONFIG_EXTENT_TYPE\u003c/b\u003e=std::size_t  \nDefine this to `std::ptrdiff_t` to use the signed type. The default is `std::size_t`, as in C++20 (since v0.7.0).\n\n### Select size type\n\n-D\u003cb\u003espan_CONFIG_SIZE_TYPE\u003c/b\u003e=std::size_t  \nDefine this to `std::ptrdiff_t` to use the signed type. The default is `std::size_t`, as in C++20 (since v0.7.0). Note `span_CONFIG_SIZE_TYPE` replaces `span_CONFIG_INDEX_TYPE` which is deprecated.\n\n### Disable exceptions\n\n-D\u003cb\u003espan_CONFIG_NO_EXCEPTIONS\u003c/b\u003e=0  \nDefine this to 1 if you want to compile without exceptions. If not defined, the header tries and detect if exceptions have been disabled (e.g. via `-fno-exceptions`). Disabling exceptions will force contract violation to use termination, see [contract violation macros](#contract-violation-response-macros). Default is undefined.\n\n### Provide construction from std::initializer_list (p2447)\n\n-D\u003cb\u003espan_FEATURE_WITH_INITIALIZER_LIST_P2447\u003c/b\u003e=0  \nDefine this to 1 to enable constructing a span from a std::initializer_list\u003c\u003e as a constant set of values. See proposal [p2447](https://wg21.link/p2447). Default is undefined.\n\n### Provide construction using `with_container_t`\n\n-D\u003cb\u003espan_FEATURE_WITH_CONTAINER\u003c/b\u003e=0  \nDefine this to 1 to enable constructing a span using `with_container_t`. Note that `span_FEATURE_WITH_CONTAINER` takes precedence over `span_FEATURE_WITH_CONTAINER_TO_STD`. Default is undefined.\n\n-D\u003cb\u003espan_FEATURE_WITH_CONTAINER_TO_STD\u003c/b\u003e=*n*  \nDefine this to the highest C++ language version for which to enable constructing a span using `with_container_t`, like 98, 03, 11, 14, 17, 20. You can use 99 for inclusion with any standard, but prefer to use `span_FEATURE_WITH_CONTAINER` for this. Note that `span_FEATURE_WITH_CONTAINER` takes precedence over `span_FEATURE_WITH_CONTAINER_TO_STD`. Default is undefined.\n\n### Provide construction from `std::array` with const data\n\n-D\u003cb\u003espan_FEATURE_CONSTRUCTION_FROM_STDARRAY_ELEMENT_TYPE\u003c/b\u003e=0  \nDefine this to 1 to enable constructing a span from a std::array with const data. Default is undefined.\n\n### Provide `operator()` member function\n\n-D\u003cb\u003espan_FEATURE_MEMBER_CALL_OPERATOR\u003c/b\u003e=0  \nDefine this to 1 to provide member function `operator()`for element access. It is equivalent to `operator[]` and has been marked `[[deprecated]]`. Its main purpose is to provide a migration path. Default is undefined.\n\n### Provide `at()` member function\n\n-D\u003cb\u003espan_FEATURE_MEMBER_AT\u003c/b\u003e=0  \nDefine this to 1 to provide member function `at()`. Define this to 2 to include index and size in message of std::out_of_range exception. Default is undefined.\n\n### Provide `back()` and `front()` member functions\n\n-D\u003cb\u003espan_FEATURE_MEMBER_BACK_FRONT\u003c/b\u003e=1  _(on since v0.5.0)_  \nDefine this to 0 to omit member functions `back()` and `front()`. Default is undefined.\n\n### Provide `swap()` member function\n\n-D\u003cb\u003espan_FEATURE_MEMBER_SWAP\u003c/b\u003e=0  \nDefine this to 1 to provide member function `swap()`. Default is undefined.\n\n### Provide `operator==()` and other comparison functions\n\n-D\u003cb\u003espan_FEATURE_COMPARISON\u003c/b\u003e=0  \nDefine this to 1 to include the comparison functions to compare the content of two spans. C++20's span does not provide comparison and _span lite_ omits comparison from v0.7.0. Default is undefined.\n\n### Provide `same()` function\n\n-D\u003cb\u003espan_FEATURE_SAME\u003c/b\u003e=0  \nDefine this to 1 to provide function `same()` to test if two spans refer as identical spans to the same data via the same type. If `same()` is enabled, `operator==()` incorporates it in its comparison. Default is undefined.\n\n### Provide `first()`, `last()` and `subspan()` functions\n\n-D\u003cb\u003espan_FEATURE_NON_MEMBER_FIRST_LAST_SUB\u003c/b\u003e=0  \nDefine this to 1 to enable both `span_FEATURE_NON_MEMBER_FIRST_LAST_SUB_SPAN` and `span_FEATURE_NON_MEMBER_FIRST_LAST_SUB_CONTAINER`. Default is undefined.\n\n-D\u003cb\u003espan_FEATURE_NON_MEMBER_FIRST_LAST_SUB_SPAN\u003c/b\u003e=0  \nDefine this to 1 to provide functions `first()`, `last()` and `subspan()` that take a `span\u003c\u003e` (work with C++98). This implies `span_FEATURE_MAKE_SPAN` to provide functions `make_span()` that are required for this feature. Default is undefined.\n\n-D\u003cb\u003espan_FEATURE_NON_MEMBER_FIRST_LAST_SUB_CONTAINER\u003c/b\u003e=0  \nDefine this to 1 to provide functions `first()`, `last()` and `subspan()` that take a compatible container (requires C++11). This implies `span_FEATURE_MAKE_SPAN` to provide functions `make_span()` that are required for this feature. Default is undefined.\n\n### Provide `make_span()` functions\n\n-D\u003cb\u003espan_FEATURE_MAKE_SPAN\u003c/b\u003e=0  \nDefine this to 1 to provide creator functions `nonstd::make_span()`. This feature is implied by using `span_FEATURE_NON_MEMBER_FIRST_LAST_SUB=1`. Note that `span_FEATURE_MAKE_SPAN` takes precedence over `span_FEATURE_MAKE_SPAN_TO_STD`. Default is undefined.\n\n-D\u003cb\u003espan_FEATURE_MAKE_SPAN_TO_STD\u003c/b\u003e=*n*  \nDefine this to the highest C++ language version for which to provide creator functions `nonstd::make_span()`, like 98, 03, 11, 14, 17, 20. You can use 99 for inclusion with any standard, but prefer to use `span_FEATURE_MAKE_SPAN` for this. Note that `span_FEATURE_MAKE_SPAN` takes precedence over `span_FEATURE_MAKE_SPAN_TO_STD`. Default is undefined.\n\n### Provide `byte_span()` functions\n\n-D\u003cb\u003espan_FEATURE_BYTE_SPAN\u003c/b\u003e=0  \nDefine this to 1 to provide creator functions `nonstd::byte_span()`. Default is undefined.\n\n### Contract violation response macros\n\n*span-lite* provides contract violation response control as suggested in proposal [N4415](http://wg21.link/n4415).\n\n\\-D\u003cb\u003espan\\_CONFIG\\_CONTRACT\\_LEVEL\\_ON\u003c/b\u003e  (*default*)  \nDefine this macro to include both `span_EXPECTS` and `span_ENSURES` in the code. This is the default case.\n\n\\-D\u003cb\u003espan\\_CONFIG\\_CONTRACT\\_LEVEL\\_OFF\u003c/b\u003e  \nDefine this macro to exclude both `span_EXPECTS` and `span_ENSURES` from the code.\n\n\\-D\u003cb\u003espan\\_CONFIG_CONTRACT\\_LEVEL\\_EXPECTS\\_ONLY\u003c/b\u003e  \nDefine this macro to include `span_EXPECTS` in the code and exclude `span_ENSURES` from the code.\n\n\\-D\u003cb\u003espan\\_CONFIG\\_CONTRACT\\_LEVEL\\_ENSURES\\_ONLY\u003c/b\u003e  \nDefine this macro to exclude `span_EXPECTS` from the code and include `span_ENSURES` in the code.\n\n\\-D\u003cb\u003espan\\_CONFIG\\_CONTRACT\\_VIOLATION\\_TERMINATES\u003c/b\u003e  (*default*)  \nDefine this macro to call `std::terminate()` on a contract violation in `span_EXPECTS`, `span_ENSURES`. This is the default case.\n\n\\-D\u003cb\u003espan\\_CONFIG\\_CONTRACT\\_VIOLATION\\_THROWS\u003c/b\u003e  \nDefine this macro to throw an exception of implementation-defined type that is derived from `std::runtime_exception` instead of calling `std::terminate()` on a contract violation in `span_EXPECTS` and `span_ENSURES`. See also [disable exceptions](#disable-exceptions).\n\nReported to work with\n--------------------\nThe table below mentions the compiler versions *span lite* is reported to work with.\n\nOS           | Compiler   | Where   | Versions |\n------------:|:-----------|:--------|:---------|\n**GNU/Linux**| Clang/LLVM | Travis  | 3.5.0, 3.6.2, 3.7.1, 3.8.0, 3.9.1, 4.0.1  |\n \u0026nbsp;      | GCC        | Travis  | 5.5.0, 6.4.0, 7.3.0 |\n**OS X**     | ?          | Local   | ?        |\n**Windows**  | Clang/LLVM | Local   | 6.0.0    |\n\u0026nbsp;       | GCC        | Local   | 7.2.0    |\n\u0026nbsp;       | Visual C++\u003cbr\u003e(Visual Studio)| Local | 8 (2005), 10 (2010), 11 (2012),\u003cbr\u003e12 (2013), 14 (2015), 15 (2017) |\n\u0026nbsp;       | Visual C++\u003cbr\u003e(Visual Studio)| AppVeyor | 10 (2010), 11 (2012),\u003cbr\u003e12 (2013), 14 (2015), 15 (2017) |\n\n## Building the tests\n\nTo build the tests you need:\n\n- [CMake](http://cmake.org), version 3.0 or later to be installed and in your PATH.\n- A [suitable compiler](#reported-to-work-with).\n\nThe [*lest* test framework](https://github.com/martinmoene/lest) is included in the [test folder](test).\n\nThe following steps assume that the [*span lite* source code](https://github.com/martinmoene/span-lite) has been cloned into a directory named `./span-lite`.\n\n1. Create a directory for the build outputs.\n\n        cd ./span-lite\n        md build \u0026\u0026 cd build\n\n2. Configure CMake to use the compiler of your choice (run `cmake --help` for a list).\n\n        cmake -G \"Unix Makefiles\" -DSPAN_LITE_OPT_BUILD_TESTS=ON ..\n\n3. Optional. You can control above configuration through the following options:\n\n    `-DSPAN_LITE_OPT_BUILD_TESTS=ON`: build the tests for span, default off  \n    `-DSPAN_LITE_OPT_BUILD_EXAMPLES=OFF`: build the examples, default off  \n\n4. Build the test suite.\n\n        cmake --build .\n\n5. Run the test suite.\n\n        ctest -V\n\nAll tests should pass, indicating your platform is supported and you are ready to use *span lite*.\n\n## Other implementations of span\n\n- *gsl-lite* [span](https://github.com/martinmoene/gsl-lite/blob/73c4f16f2b35fc174fc2f09d44d5ab13e5c638c3/include/gsl/gsl-lite.hpp#L1221).\n- Microsoft GSL [span](https://github.com/Microsoft/GSL/blob/master/include/gsl/span).\n- Google Abseil [span](https://github.com/abseil/abseil-cpp/blob/master/absl/types/span.h).\n- Marshall Clow's [libc++ span snippet](https://github.com/mclow/snippets/blob/master/span.cpp).\n- Tristan Brindle's [Implementation of C++20's std::span for older compilers](https://github.com/tcbrindle/span).\n- [Search _span c++_ on GitHub](https://github.com/search?l=C%2B%2B\u0026q=span+c%2B%2B\u0026type=Repositories\u0026utf8=%E2%9C%93).\n\n## Notes and references\n\n*Interface and specification*\n\n- [span on cppreference](https://en.cppreference.com/w/cpp/container/span).\n- [p0122 - C++20 Proposal](http://wg21.link/p0122).\n- [span in C++20 Working Draft](http://eel.is/c++draft/views).\n\n*Presentations*\n\n- TBD\n\n*Proposals*\n\n- [p0122 - span: bounds-safe views for sequences of objects](http://wg21.link/p0122).\n- [p1024 - Usability Enhancements for std::span](http://wg21.link/p1024).\n- [p1419 - A SFINAE-friendly trait to determine the extent of statically sized containers](http://wg21.link/p1419).  \n- [p0805 - Comparing Containers](http://wg21.link/p0805).\n- [p1085 - Should Span be Regular?](http://wg21.link/p0805).\n- [p0091 - Template argument deduction for class templates](http://wg21.link/p0091).\n- [p0856 - Restrict Access Property for mdspan and span](http://wg21.link/p0856).\n- [p1428 - Subscripts and sizes should be signed](http://wg21.link/p1428).\n- [p1089 - Sizes Should Only span Unsigned](http://wg21.link/p1089).\n- [p1227 - Signed size() functions](http://wg21.link/p1227).\n- [p1872 - span should have size_type, not index_type](http://wg21.link/p1872).\n- [p2447 - std::span and the missing constructor](https://wg21.link/p2447).\n- [lwg 3101 - span's Container constructors need another constraint](https://cplusplus.github.io/LWG/issue3101).\n- [Reddit - 2018-06 Rapperswil ISO C++ Committee Trip Report](https://www.reddit.com/r/cpp/comments/8prqzm/2018_rapperswil_iso_c_committee_trip_report/)\n- [Reddit - 2018-11 San Diego ISO C++ Committee Trip Report](https://www.reddit.com/r/cpp/comments/9vwvbz/2018_san_diego_iso_c_committee_trip_report_ranges/).\n- [Reddit - 2019-02 Kona ISO C++ Committee Trip Report](https://www.reddit.com/r/cpp/comments/au0c4x/201902_kona_iso_c_committee_trip_report_c20/).\n- [Reddit - 2019-07 Cologne ISO C++ Committee Trip Report](https://www.reddit.com/r/cpp/comments/cfk9de/201907_cologne_iso_c_committee_trip_report_the/)\n- [Reddit - 2019-11 Belfast ISO C++ Committee Trip Report](https://www.reddit.com/r/cpp/comments/dtuov8/201911_belfast_iso_c_committee_trip_report/)\n- \u003ca id=\"regtyp\"\u003e\u003c/a\u003eTitus Winters. [Revisiting Regular Types](https://abseil.io/blog/20180531-regular-types). Abseil Blog. 31 May 2018.\n\n## Appendix\n\n### A.1 Compile-time information\n\nThe version of *span lite* is available via tag `[.version]`. The following tags are available for information on the compiler and on the C++ standard library used: `[.compiler]`, `[.stdc++]`, `[.stdlanguage]` and `[.stdlibrary]`.\n\n### A.2 Span lite test specification\n\n\u003cdetails\u003e\n\u003csummary\u003eclick to expand\u003c/summary\u003e\n\u003cp\u003e\n\n```Text\nspan\u003c\u003e: Terminates construction from a nullptr and a non-zero size (C++11)\nspan\u003c\u003e: Terminates construction from two pointers in the wrong order\nspan\u003c\u003e: Terminates construction from a null pointer and a non-zero size\nspan\u003c\u003e: Terminates creation of a sub span of the first n elements for n exceeding the span\nspan\u003c\u003e: Terminates creation of a sub span of the last n elements for n exceeding the span\nspan\u003c\u003e: Terminates creation of a sub span outside the span\nspan\u003c\u003e: Terminates access outside the span\nspan\u003c\u003e: Throws  on access outside the span via at(): std::out_of_range [span_FEATURE_MEMBER_AT\u003e0][span_CONFIG_NO_EXCEPTIONS=0]\nspan\u003c\u003e: Termination throws std::logic_error-derived exception [span_CONFIG_CONTRACT_VIOLATION_THROWS=1]\nspan\u003c\u003e: Allows to default-construct\nspan\u003c\u003e: Allows to construct from a nullptr and a zero size (C++11)\nspan\u003c\u003e: Allows to construct from two pointers\nspan\u003c\u003e: Allows to construct from two iterators\nspan\u003c\u003e: Allows to construct from two iterators - empty range\nspan\u003c\u003e: Allows to construct from two iterators - move-only element\nspan\u003c\u003e: Allows to construct from an iterator and a size\nspan\u003c\u003e: Allows to construct from an iterator and a size - empty range\nspan\u003c\u003e: Allows to construct from an iterator and a size - move-only element\nspan\u003c\u003e: Allows to construct from two pointers to const\nspan\u003c\u003e: Allows to construct from a non-null pointer and a size\nspan\u003c\u003e: Allows to construct from a non-null pointer to const and a size\nspan\u003c\u003e: Allows to construct from a temporary pointer and a size\nspan\u003c\u003e: Allows to construct from a temporary pointer to const and a size\nspan\u003c\u003e: Allows to construct from any pointer and a zero size (C++98)\nspan\u003c\u003e: Allows to construct from a pointer and a size via a deduction guide (C++17)\nspan\u003c\u003e: Allows to construct from an iterator and a size via a deduction guide (C++17)\nspan\u003c\u003e: Allows to construct from two iterators via a deduction guide (C++17)\nspan\u003c\u003e: Allows to construct from a C-array\nspan\u003c\u003e: Allows to construct from a C-array via a deduction guide (C++17)\nspan\u003c\u003e: Allows to construct from a const C-array\nspan\u003c\u003e: Allows to construct from a C-array with size via decay to pointer (potentially dangerous)\nspan\u003c\u003e: Allows to construct from a const C-array with size via decay to pointer (potentially dangerous)\nspan\u003c\u003e: Allows to construct from a std::initializer_list\u003c\u003e (C++11)\nspan\u003c\u003e: Allows to construct from a std::initializer_list\u003c\u003e as a constant set of values (C++11, p2447)\nspan\u003c\u003e: Allows to construct from a std::array\u003c\u003e (C++11)\nspan\u003c\u003e: Allows to construct from a std::array via a deduction guide (C++17)\nspan\u003c\u003e: Allows to construct from a std::array\u003c\u003e with const data (C++11, span_FEATURE_CONSTR..._ELEMENT_TYPE=1)\nspan\u003c\u003e: Allows to construct from an empty std::array\u003c\u003e (C++11)\nspan\u003c\u003e: Allows to construct from a container (std::vector\u003c\u003e)\nspan\u003c\u003e: Allows to construct from a container via a deduction guide (std::vector\u003c\u003e, C++17)\nspan\u003c\u003e: Allows to tag-construct from a container (std::vector\u003c\u003e)\nspan\u003c\u003e: Allows to tag-construct from a const container (std::vector\u003c\u003e)\nspan\u003c\u003e: Allows to copy-construct from another span of the same type\nspan\u003c\u003e: Allows to copy-construct from another span of a compatible type\nspan\u003c\u003e: Allows to copy-construct from a temporary span of the same type (C++11)\nspan\u003c\u003e: Allows to copy-assign from another span of the same type\nspan\u003c\u003e: Allows to copy-assign from a temporary span of the same type (C++11)\nspan\u003c\u003e: Allows to create a sub span of the first n elements\nspan\u003c\u003e: Allows to create a sub span of the last n elements\nspan\u003c\u003e: Allows to create a sub span starting at a given offset\nspan\u003c\u003e: Allows to create a sub span starting at a given offset with a given length\nspan\u003c\u003e: Allows to observe an element via array indexing\nspan\u003c\u003e: Allows to observe an element via call indexing\nspan\u003c\u003e: Allows to observe an element via at() [span_FEATURE_MEMBER_AT\u003e0]\nspan\u003c\u003e: Allows to observe an element via data()\nspan\u003c\u003e: Allows to observe the first element via front() [span_FEATURE_MEMBER_BACK_FRONT=1]\nspan\u003c\u003e: Allows to observe the last element via back() [span_FEATURE_MEMBER_BACK_FRONT=1]\nspan\u003c\u003e: Allows to change an element via array indexing\nspan\u003c\u003e: Allows to change an element via call indexing\nspan\u003c\u003e: Allows to change an element via at() [span_FEATURE_MEMBER_AT\u003e0]\nspan\u003c\u003e: Allows to change an element via data()\nspan\u003c\u003e: Allows to change the first element via front() [span_FEATURE_MEMBER_BACK_FRONT=1]\nspan\u003c\u003e: Allows to change the last element via back() [span_FEATURE_MEMBER_BACK_FRONT=1]\nspan\u003c\u003e: Allows to swap with another span [span_FEATURE_MEMBER_SWAP=1]\nspan\u003c\u003e: Allows forward iteration\nspan\u003c\u003e: Allows const forward iteration\nspan\u003c\u003e: Allows reverse iteration\nspan\u003c\u003e: Allows const reverse iteration\nspan\u003c\u003e: Allows to identify if a span is the same as another span [span_FEATURE_SAME=1]\nspan\u003c\u003e: Allows to compare equal to another span of the same type [span_FEATURE_COMPARISON=1]\nspan\u003c\u003e: Allows to compare unequal to another span of the same type [span_FEATURE_COMPARISON=1]\nspan\u003c\u003e: Allows to compare less than another span of the same type [span_FEATURE_COMPARISON=1]\nspan\u003c\u003e: Allows to compare less than or equal to another span of the same type [span_FEATURE_COMPARISON=1]\nspan\u003c\u003e: Allows to compare greater than another span of the same type [span_FEATURE_COMPARISON=1]\nspan\u003c\u003e: Allows to compare greater than or equal to another span of the same type [span_FEATURE_COMPARISON=1]\nspan\u003c\u003e: Allows to compare to another span of the same type and different cv-ness [span_FEATURE_SAME=0]\nspan\u003c\u003e: Allows to compare empty spans as equal [span_FEATURE_COMPARISON=1]\nspan\u003c\u003e: Allows to test for empty span via empty(), empty case\nspan\u003c\u003e: Allows to test for empty span via empty(), non-empty case\nspan\u003c\u003e: Allows to obtain the number of elements via size()\nspan\u003c\u003e: Allows to obtain the number of elements via ssize()\nspan\u003c\u003e: Allows to obtain the number of bytes via size_bytes()\nspan\u003c\u003e: Allows to view the elements as read-only bytes\nspan\u003c\u003e: Allows to view and change the elements as writable bytes\nmake_span() [span_FEATURE_MAKE_SPAN_TO_STD=99]\nmake_span(): Allows building from two pointers\nmake_span(): Allows building from two const pointers\nmake_span(): Allows building from a non-null pointer and a size\nmake_span(): Allows building from a non-null const pointer and a size\nmake_span(): Allows building from a C-array\nmake_span(): Allows building from a const C-array\nmake_span(): Allows building from a std::initializer_list\u003c\u003e (C++11)\nmake_span(): Allows building from a std::initializer_list\u003c\u003e as a constant set of values (C++11)\nmake_span(): Allows building from a std::array\u003c\u003e (C++11)\nmake_span(): Allows building from a const std::array\u003c\u003e (C++11)\nmake_span(): Allows building from a container (std::vector\u003c\u003e)\nmake_span(): Allows building from a const container (std::vector\u003c\u003e)\nmake_span(): Allows building from a container (with_container_t, std::vector\u003c\u003e)\nmake_span(): Allows building from a const container (with_container_t, std::vector\u003c\u003e)\nbyte_span() [span_FEATURE_BYTE_SPAN=1]\nbyte_span(): Allows building a span of std::byte from a single object (C++17, byte-lite)\nbyte_span(): Allows building a span of const std::byte from a single const object (C++17, byte-lite)\nfirst(), last(), subspan() [span_FEATURE_NON_MEMBER_FIRST_LAST_SUB=1]\nfirst(): Allows to create a sub span of the first n elements (span, template parameter)\nfirst(): Allows to create a sub span of the first n elements (span, function parameter)\nfirst(): Allows to create a sub span of the first n elements (compatible container, template parameter)\nfirst(): Allows to create a sub span of the first n elements (compatible container, function parameter)\nlast(): Allows to create a sub span of the last n elements (span, template parameter)\nlast(): Allows to create a sub span of the last n elements (span, function parameter)\nlast(): Allows to create a sub span of the last n elements (compatible container, template parameter)\nlast(): Allows to create a sub span of the last n elements (compatible container, function parameter)\nsubspan(): Allows to create a sub span starting at a given offset (span, template parameter)\nsubspan(): Allows to create a sub span starting at a given offset (span, function parameter)\nsubspan(): Allows to create a sub span starting at a given offset (compatible container, template parameter)\nsubspan(): Allows to create a sub span starting at a given offset (compatible container, function parameter)\nsize(): Allows to obtain the number of elements via size()\nssize(): Allows to obtain the number of elements via ssize()\ntuple_size\u003c\u003e: Allows to obtain the number of elements via std::tuple_size\u003c\u003e (C++11)\ntuple_element\u003c\u003e: Allows to obtain an element via std::tuple_element\u003c\u003e (C++11)\ntuple_element\u003c\u003e: Allows to obtain an element via std::tuple_element_t\u003c\u003e (C++11)\nget\u003cI\u003e(spn): Allows to access an element via std::get\u003c\u003e()\ntweak header: reads tweak header if supported [tweak]\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n","funding_links":[],"categories":["Standard/Support Libraries","C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinmoene%2Fspan-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartinmoene%2Fspan-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartinmoene%2Fspan-lite/lists"}