#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <type_traits>
Go to the source code of this file.
|
template<typename A , int N> |
constexpr Span< A > | MakeSpan (A(&a)[N]) |
| MakeSpan for arrays: More...
|
|
template<typename V > |
constexpr auto | MakeSpan (V &&v SPAN_ATTR_LIFETIMEBOUND) -> typename std::enable_if< !std::is_lvalue_reference< V >::value, Span< const typename std::remove_pointer< decltype(v.data())>::type >>::type |
| MakeSpan for temporaries / rvalue references, only supporting const output. More...
|
|
template<typename V > |
constexpr auto | MakeSpan (V &v SPAN_ATTR_LIFETIMEBOUND) -> Span< typename std::remove_pointer< decltype(v.data())>::type > |
| MakeSpan for (lvalue) references, supporting mutable output. More...
|
|
template<typename T > |
T & | SpanPopBack (Span< T > &span) |
| Pop the last element off a span, and return a reference to that element. More...
|
|
uint8_t * | UCharCast (char *c) |
|
uint8_t * | UCharCast (uint8_t *c) |
|
const uint8_t * | UCharCast (const char *c) |
|
const uint8_t * | UCharCast (const uint8_t *c) |
|
template<typename T > |
constexpr auto | UCharSpanCast (Span< T > s) -> Span< typename std::remove_pointer< decltype(UCharCast(s.data()))>::type > |
|
template<typename V > |
constexpr auto | MakeUCharSpan (V &&v) -> decltype(UCharSpanCast(MakeSpan(std::forward< V >(v)))) |
| Like MakeSpan, but for (const) uint8_t member types only. More...
|
|
◆ ASSERT_IF_DEBUG
#define ASSERT_IF_DEBUG |
( |
|
x | ) |
|
◆ CONSTEXPR_IF_NOT_DEBUG
#define CONSTEXPR_IF_NOT_DEBUG constexpr |
◆ SPAN_ATTR_LIFETIMEBOUND
#define SPAN_ATTR_LIFETIMEBOUND |
◆ MakeSpan() [1/3]
template<typename A , int N>
constexpr Span<A> MakeSpan |
( |
A(&) |
a[N] | ) |
|
|
constexpr |
MakeSpan for arrays:
Definition at line 259 of file span.h.
◆ MakeSpan() [2/3]
template<typename V >
constexpr auto MakeSpan |
( |
V &&v |
SPAN_ATTR_LIFETIMEBOUND | ) |
-> typename std::enable_if<
!std::is_lvalue_reference<V>::value,
Span<const typename std::remove_pointer<decltype(v.data())>::type>>::type |
|
constexpr |
MakeSpan for temporaries / rvalue references, only supporting const output.
Definition at line 266 of file span.h.
◆ MakeSpan() [3/3]
template<typename V >
constexpr auto MakeSpan |
( |
V &v |
SPAN_ATTR_LIFETIMEBOUND | ) |
-> Span<typename std::remove_pointer<decltype(v.data())>::type> |
|
constexpr |
MakeSpan for (lvalue) references, supporting mutable output.
Definition at line 273 of file span.h.
◆ MakeUCharSpan()
Like MakeSpan, but for (const) uint8_t member types only.
Only works for (un)signed char containers.
Definition at line 311 of file span.h.
◆ SpanPopBack()
template<typename T >
T& SpanPopBack |
( |
Span< T > & |
span | ) |
|
Pop the last element off a span, and return a reference to that element.
Definition at line 279 of file span.h.
◆ UCharCast() [1/4]
uint8_t* UCharCast |
( |
char * |
c | ) |
|
|
inline |
◆ UCharCast() [2/4]
const uint8_t* UCharCast |
( |
const char * |
c | ) |
|
|
inline |
◆ UCharCast() [3/4]
const uint8_t* UCharCast |
( |
const uint8_t * |
c | ) |
|
|
inline |
◆ UCharCast() [4/4]
uint8_t* UCharCast |
( |
uint8_t * |
c | ) |
|
|
inline |
◆ UCharSpanCast()
template<typename T >
constexpr auto UCharSpanCast |
( |
Span< T > |
s | ) |
-> Span<typename std::remove_pointer<decltype(UCharCast(s.data()))>::type> |
|
constexpr |