![]() |
BSHA3
0.17.99
P2P Blockchain, based on Bitcoin
|
#include <type_traits>
#include <cstddef>
#include <algorithm>
Go to the source code of this file.
Classes | |
class | Span< C > |
A Span is an object that can refer to a contiguous sequence of objects. More... | |
Functions | |
template<typename A , int N> | |
constexpr Span< A > | MakeSpan (A(&a)[N]) |
Create a span to a container exposing data() and size(). More... | |
template<typename V > | |
constexpr Span< typename std::remove_pointer< decltype(std::declval< V >).data())>::type > | MakeSpan (V &v) |
constexpr Span<A> MakeSpan | ( | A(&) | a[N] | ) |
Create a span to a container exposing data() and size().
This correctly deals with constness: the returned Span's element type will be whatever data() returns a pointer to. If either the passed container is const, or its element type is const, the resulting span will have a const element type.
std::span will have a constructor that implements this functionality directly.
Definition at line 55 of file span.h.