openMSX
Classes | Namespaces | 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, std::void_t< decltype(std::size(std::declval< T >())), decltype(std::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, std::void_t< decltype(std::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
 

Functions

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_v< ElementType >, 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 342 of file span.hh.

◆ as_writable_bytes()

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

Definition at line 351 of file span.hh.

Variable Documentation

◆ dynamic_extent

constexpr size_t dynamic_extent = size_t(-1)

Definition at line 31 of file span.hh.