span.h File Reference
#include <array>
#include <cstddef>
#include <cstdint>
#include <type_traits>

Classes

struct  TCB_SPAN_NAMESPACE_NAME::detail::span_storage< E, S >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::span_storage< E, dynamic_extent >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::is_span< typename >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::is_span< span< T, S > >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::is_std_array< typename >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::is_std_array< std::array< T, N > >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::has_size_and_data< typename, typename >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::has_size_and_data< T, void_t< decltype(detail::size(std::declval< T >())), decltype(detail::data(std::declval< T >()))> >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::is_container< C, U >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::is_container_element_type_compatible< typename, typename, typename >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::is_container_element_type_compatible< T, E, typename std::enable_if< !std::is_same< typename std::remove_cv< decltype(detail::data(std::declval< T >()))>::type, void >::value >::type >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::is_complete< typename, typename >
 
struct  TCB_SPAN_NAMESPACE_NAME::detail::is_complete< T, decltype(sizeof(T))>
 
class  TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent >
 
class  std::tuple_size< TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent > >
 
class  std::tuple_element< I, TCB_SPAN_NAMESPACE_NAME::span< ElementType, Extent > >
 

Namespaces

 TCB_SPAN_NAMESPACE_NAME
 
 TCB_SPAN_NAMESPACE_NAME::detail
 

Macros

#define TCB_SPAN_NAMESPACE_NAME   ttg
 
#define TCB_SPAN_NO_EXCEPTIONS
 
#define TCB_SPAN_NO_CONTRACT_CHECKING
 
#define TCB_SPAN_EXPECT(cond)
 
#define TCB_SPAN_INLINE_VAR
 
#define TCB_SPAN_CONSTEXPR14
 
#define TCB_SPAN_CONSTEXPR_ASSIGN
 
#define TCB_SPAN_CONSTEXPR11   constexpr
 
#define TCB_SPAN_ARRAY_CONSTEXPR
 
#define TCB_SPAN_NODISCARD
 

Typedefs

using TCB_SPAN_NAMESPACE_NAME::byte = unsigned char
 
template<typename... >
using TCB_SPAN_NAMESPACE_NAME::detail::void_t = void
 
template<typename T >
using TCB_SPAN_NAMESPACE_NAME::detail::uncvref_t = typename std::remove_cv< typename std::remove_reference< T >::type >::type
 
template<typename T >
using TCB_SPAN_NAMESPACE_NAME::detail::remove_pointer_t = typename std::remove_pointer< T >::type
 

Functions

template<class C >
constexpr auto TCB_SPAN_NAMESPACE_NAME::detail::size (const C &c) -> decltype(c.size())
 
template<class T , std::size_t N>
constexpr std::size_t TCB_SPAN_NAMESPACE_NAME::detail::size (const T(&)[N]) noexcept
 
template<class C >
constexpr auto TCB_SPAN_NAMESPACE_NAME::detail::data (C &c) -> decltype(c.data())
 
template<class C >
constexpr auto TCB_SPAN_NAMESPACE_NAME::detail::data (const C &c) -> decltype(c.data())
 
template<class T , std::size_t N>
constexpr T * TCB_SPAN_NAMESPACE_NAME::detail::data (T(&array)[N]) noexcept
 
template<class E >
constexpr const E * TCB_SPAN_NAMESPACE_NAME::detail::data (std::initializer_list< E > il) noexcept
 
template<typename ElementType , std::size_t Extent>
constexpr span< ElementType, Extent > TCB_SPAN_NAMESPACE_NAME::make_span (span< ElementType, Extent > s) noexcept
 
template<typename T , std::size_t N>
constexpr span< T, N > TCB_SPAN_NAMESPACE_NAME::make_span (T(&arr)[N]) noexcept
 
template<typename T , std::size_t N>
TCB_SPAN_ARRAY_CONSTEXPR span< T, N > TCB_SPAN_NAMESPACE_NAME::make_span (std::array< T, N > &arr) noexcept
 
template<typename T , std::size_t N>
TCB_SPAN_ARRAY_CONSTEXPR span< const T, N > TCB_SPAN_NAMESPACE_NAME::make_span (const std::array< T, N > &arr) noexcept
 
template<typename Container >
constexpr span< typename Container::value_type > TCB_SPAN_NAMESPACE_NAME::make_span (Container &cont)
 
template<typename Container >
constexpr span< const typename Container::value_type > TCB_SPAN_NAMESPACE_NAME::make_span (const Container &cont)
 
template<typename ElementType , std::size_t Extent>
span< const byte,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> TCB_SPAN_NAMESPACE_NAME::as_bytes (span< ElementType, Extent > s) noexcept
 
template<class ElementType , size_t Extent, typename std::enable_if<!std::is_const< ElementType >::value, int >::type = 0>
span< byte,((Extent==dynamic_extent) ? dynamic_extent :sizeof(ElementType) *Extent)> TCB_SPAN_NAMESPACE_NAME::as_writable_bytes (span< ElementType, Extent > s) noexcept
 
template<std::size_t N, typename E , std::size_t S>
constexpr auto TCB_SPAN_NAMESPACE_NAME::get (span< E, S > s) -> decltype(s[N])
 

Variables

constexpr TCB_SPAN_INLINE_VAR std::size_t TCB_SPAN_NAMESPACE_NAME::dynamic_extent = SIZE_MAX
 

Macro Definition Documentation

◆ TCB_SPAN_ARRAY_CONSTEXPR

#define TCB_SPAN_ARRAY_CONSTEXPR

Definition at line 131 of file span.h.

◆ TCB_SPAN_CONSTEXPR11

#define TCB_SPAN_CONSTEXPR11   constexpr

Definition at line 111 of file span.h.

◆ TCB_SPAN_CONSTEXPR14

#define TCB_SPAN_CONSTEXPR14

Definition at line 101 of file span.h.

◆ TCB_SPAN_CONSTEXPR_ASSIGN

#define TCB_SPAN_CONSTEXPR_ASSIGN

Definition at line 107 of file span.h.

◆ TCB_SPAN_EXPECT

#define TCB_SPAN_EXPECT (   cond)

Definition at line 85 of file span.h.

◆ TCB_SPAN_INLINE_VAR

#define TCB_SPAN_INLINE_VAR

Definition at line 91 of file span.h.

◆ TCB_SPAN_NAMESPACE_NAME

#define TCB_SPAN_NAMESPACE_NAME   ttg

Definition at line 14 of file span.h.

◆ TCB_SPAN_NO_CONTRACT_CHECKING

#define TCB_SPAN_NO_CONTRACT_CHECKING

Definition at line 64 of file span.h.

◆ TCB_SPAN_NO_EXCEPTIONS

#define TCB_SPAN_NO_EXCEPTIONS

Definition at line 35 of file span.h.

◆ TCB_SPAN_NODISCARD

#define TCB_SPAN_NODISCARD

Definition at line 143 of file span.h.