openMSX
Classes | Namespaces | Typedefs | Functions | Variables
span.hh File Reference
#include <algorithm>
#include <array>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <type_traits>
Include dependency graph for span.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  span< ElementType, Extent >
 
struct  detail::span_storage< E, S >
 
struct  detail::span_storage< E, dynamic_extent >
 
struct  detail::is_span< typename >
 
struct  detail::is_span< span< T, S > >
 
struct  detail::is_std_array< typename >
 
struct  detail::is_std_array< std::array< T, N > >
 
struct  detail::has_size_and_data< typename, typename >
 
struct  detail::has_size_and_data< T, void_t< decltype(detail::size(std::declval< T >())), decltype(detail::data(std::declval< T >()))> >
 
struct  detail::is_container< C, U >
 
struct  detail::is_container_element_type_compatible< typename, typename, typename >
 
struct  detail::is_container_element_type_compatible< T, E, void_t< decltype(detail::data(std::declval< T >()))> >
 
struct  detail::is_complete< typename, typename >
 
struct  detail::is_complete< T, decltype(sizeof(T))>
 
struct  detail::calculate_byte_size< ElementType, Extent >
 
struct  detail::calculate_byte_size< ElementType, dynamic_extent >
 
class  span< ElementType, Extent >
 

Namespaces

 detail
 

Typedefs

template<typename... >
using detail::void_t = void
 

Functions

template<typename C >
constexpr auto detail::size (const C &c) -> decltype(c.size())
 
template<typename T , size_t N>
constexpr auto detail::size (const T(&)[N]) noexcept
 
template<typename C >
constexpr auto detail::data (C &c) -> decltype(c.data())
 
template<typename C >
constexpr auto detail::data (const C &c) -> decltype(c.data())
 
template<typename T , size_t N>
constexpr T * detail::data (T(&array)[N]) noexcept
 
template<typename E >
constexpr const E * detail::data (std::initializer_list< E > il) noexcept
 
template<typename ElementType , size_t Extent>
span< const uint8_t, detail::calculate_byte_size< ElementType, Extent >::value > as_bytes (span< ElementType, Extent > s) noexcept
 
template<typename ElementType , size_t Extent, std::enable_if_t<!std::is_const< ElementType >::value, int > = 0>
span< uint8_t, detail::calculate_byte_size< ElementType, Extent >::value > as_writable_bytes (span< ElementType, Extent > s) noexcept
 

Variables

constexpr size_t dynamic_extent = size_t(-1)
 

Function Documentation

◆ as_bytes()

template<typename ElementType , size_t Extent>
span<const uint8_t, detail::calculate_byte_size<ElementType, Extent>::value> as_bytes ( span< ElementType, Extent >  s)
noexcept

Definition at line 368 of file span.hh.

◆ as_writable_bytes()

template<typename ElementType , size_t Extent, std::enable_if_t<!std::is_const< ElementType >::value, int > = 0>
span<uint8_t, detail::calculate_byte_size<ElementType, Extent>::value> as_writable_bytes ( span< ElementType, Extent >  s)
noexcept

Definition at line 377 of file span.hh.

Variable Documentation

◆ dynamic_extent

constexpr size_t dynamic_extent = size_t(-1)

Definition at line 31 of file span.hh.