Bitcoin ABC 0.26.3
P2P Digital Currency
|
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <type_traits>
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... | |
struct | Span< C >::is_Span_int< T > |
struct | Span< C >::is_Span_int< Span< T > > |
struct | Span< C >::is_Span< T > |
Macros | |
#define | CONSTEXPR_IF_NOT_DEBUG constexpr |
#define | ASSERT_IF_DEBUG(x) |
#define | SPAN_ATTR_LIFETIMEBOUND |
Functions | |
template<typename T , typename EndOrSize > | |
Span (T *, EndOrSize) -> Span< T > | |
template<typename T , std::size_t N> | |
Span (T(&)[N]) -> Span< T > | |
template<typename T > | |
Span (T &&) -> Span< std::enable_if_t< !std::is_lvalue_reference_v< T >, const std::remove_pointer_t< decltype(std::declval< T && >().data())> > > | |
template<typename T > | |
Span (T &) -> Span< std::remove_pointer_t< decltype(std::declval< T & >().data())> > | |
template<typename T > | |
T & | SpanPopBack (Span< T > &span) |
Pop the last element off a span, and return a reference to that element. | |
const std::byte * | BytePtr (const void *data) |
Convert a data pointer to a std::byte data pointer. | |
std::byte * | BytePtr (void *data) |
template<typename T > | |
Span< const std::byte > | AsBytes (Span< T > s) noexcept |
template<typename T > | |
Span< std::byte > | AsWritableBytes (Span< T > s) noexcept |
template<typename V > | |
Span< const std::byte > | MakeByteSpan (V &&v) noexcept |
template<typename V > | |
Span< std::byte > | MakeWritableByteSpan (V &&v) noexcept |
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) |
const uint8_t * | UCharCast (const std::byte *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(Span{std::forward< V >(v)})) |
Like the Span constructor, but for (const) uint8_t member types only. | |
|
constexpr |
Span | ( | T && | ) | -> Span< std::enable_if_t< !std::is_lvalue_reference_v< T >, const std::remove_pointer_t< decltype(std::declval< T && >().data())> > > |
Span | ( | T & | ) | -> Span< std::remove_pointer_t< decltype(std::declval< T & >().data())> > |
Span | ( | T(&) | [N] | ) | -> Span< T > |