span_utils.hpp

A set of simple functions to manipulate std::span.

Note

Status: BETA

Functions

template<typename T>
void Print(const std::span<T> &v, std::ostream &os = std::cout, const std::string &spacer = " ")

Print the contents of a span.

template<typename T, size_t SIZE>
auto to_span(array<T, SIZE> a)

Convert an array to an equivalent span.

template<typename T, typename ...Ts>
auto to_span(vector<T, Ts...> v)

Convert an vector to an equivalent span.

namespace std

STL namespace.

Functions

template<typename T>
std::ostream &operator<<(std::ostream &out, std::span<T> s)
template<typename T>
std::istream &operator>>(std::istream &is, std::span<T> s)