#include <type_traits>
#include <cstddef>
#include <algorithm>
#include <assert.h>
Go to the source code of this file.
|
| template<typename A , int N> |
| Span< A > constexpr | MakeSpan (A(&a)[N]) |
| | MakeSpan for arrays: More...
|
| |
| template<typename V > |
| constexpr auto | MakeSpan (V &&v) -> 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< 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...
|
| |
| unsigned char * | UCharCast (char *c) |
| |
| unsigned char * | UCharCast (unsigned char *c) |
| |
| const unsigned char * | UCharCast (const char *c) |
| |
| const unsigned char * | UCharCast (const unsigned char *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) unsigned char member types only. More...
|
| |
| #define ASSERT_IF_DEBUG |
( |
|
x | ) |
|
| #define CONSTEXPR_IF_NOT_DEBUG constexpr |
template<typename A , int N>
| Span<A> constexpr MakeSpan |
( |
A(&) |
a[N] | ) |
|
MakeSpan for arrays:
Definition at line 193 of file span.h.
template<typename V >
| constexpr auto MakeSpan |
( |
V && |
v | ) |
-> 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.
Definition at line 195 of file span.h.
template<typename V >
| constexpr auto MakeSpan |
( |
V & |
v | ) |
-> Span<typename std::remove_pointer<decltype(v.data())>::type> |
MakeSpan for (lvalue) references, supporting mutable output.
Definition at line 197 of file span.h.
Like MakeSpan, but for (const) unsigned char member types only.
Only works for (un)signed char containers.
Definition at line 220 of file span.h.
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 201 of file span.h.
| unsigned char* UCharCast |
( |
char * |
c | ) |
|
|
inline |
| unsigned char* UCharCast |
( |
unsigned char * |
c | ) |
|
|
inline |
| const unsigned char* UCharCast |
( |
const char * |
c | ) |
|
|
inline |
| const unsigned char* UCharCast |
( |
const unsigned char * |
c | ) |
|
|
inline |
template<typename T >
| constexpr auto UCharSpanCast |
( |
Span< T > |
s | ) |
-> Span<typename std::remove_pointer<decltype(UCharCast(s.data()))>::type> |