7#if defined(__cpp_lib_span)
13#elif __has_include(<gsl/span>)
19#elif __has_include(<gsl/gsl-lite.hpp>)
20#include <gsl/gsl-lite.hpp>
25#elif defined(GHPL_SPAN_HEADER)
26#include GHPL_SPAN_HEADER
28#error "No span implementation found"
34 template <
typename T> [[nodiscard]]
constexpr auto as_span() noexcept {
return [](
auto const& val) {
return ghassanpl::span{ val }; }; }
38 [[nodiscard]] span<T> consume_n(span<T>& s,
size_t n)
40 auto result = s.subspan(0, n);
46 [[nodiscard]]
decltype(
auto) consume(span<T>& s)
48 if constexpr (std::is_const_v<T>) {
49 auto const& ref = s[0];
54 auto val = std::move(s[0]);
Contains functions that return functors which transform and return their inputs somehow; appropriate ...
Primary namespace for everything in this library.