See the table below and section configuration. ![]() Span lite can provide construction from a std::initializer_list as a constant set of values as proposed in p2447. Non-standard extensions Construct from std::initializer_list (p2447) Span lite can provide back() and front() member functions for element access. To get an idea of the capabilities of nonstd::span with your configuration, look at the output of the tests, issuing span-main.t -pass For std::span, see its documentation at cppreference. ![]() Synopsisĭepending on the compiler and C++-standard used, nonstd::span behaves less or more like std::span. Put span.hpp in the include folder directly into the project source tree or somewhere reachable from your project. Span lite is a single-file header-only library. Span lite has no other dependencies than the C++ standard library. Span lite is distributed under the Boost Software License. To compensate for the class template argument deduction that is missing from pre-C++17 compilers, nonstd::span can provide make_span functions. span-lite can detect the presence of byte-lite and if present, it provides as_bytes() and as_writable_bytes() also for C++14 and earlier.įeatures and properties of span lite are ease of installation (single header), freedom of dependencies other than the standard library. If available, std::span is used, unless configured otherwise. ![]() The library provides a C++20-like span for use with C++98 and later. Span lite is a single-file header-only library to provide a bounds-safe view for sequences of objects.
0 Comments
Leave a Reply. |