tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches

etl::span view More...

Classes

struct  span< T, Extent >
 A non-owning view over a contiguous sequence of objects. More...
 

Functions

template<typename T, size_t N>
auto as_bytes (span< T, N > s) noexcept -> span< byte const, detail::span_as_bytes_size< T, N > >
 Obtains a view to the object representation of the elements of the span s.
 
template<typename T, size_t N>
auto as_writable_bytes (span< T, N > s) noexcept -> span< byte, detail::span_as_bytes_size< T, N > >
 Obtains a view to the object representation of the elements of the span s.
 

Variables

constexpr auto dynamic_extent = numeric_limits<etl::size_t>::max()
 etl::dynamic_extent is a constant of type etl::size_t that is used to differentiate etl::span of static and dynamic extent.
 

Detailed Description

etl::span view

Function Documentation

◆ as_bytes()

template<typename T, size_t N>
auto as_bytes ( span< T, N > s) -> span<byte const, detail::span_as_bytes_size<T, N>>
related

Obtains a view to the object representation of the elements of the span s.

If N is dynamic_extent, the extent of the returned span S is also dynamic_extent; otherwise it is sizeof(T) * N.

◆ as_writable_bytes()

template<typename T, size_t N>
auto as_writable_bytes ( span< T, N > s) -> span<byte, detail::span_as_bytes_size<T, N>>
related

Obtains a view to the object representation of the elements of the span s.

If N is dynamic_extent, the extent of the returned span S is also dynamic_extent; otherwise it is sizeof(T) * N. Only participates in overload resolution if is_const_v<T> is false.

Variable Documentation

◆ dynamic_extent

auto dynamic_extent = numeric_limits<etl::size_t>::max()
inlineconstexpr

etl::dynamic_extent is a constant of type etl::size_t that is used to differentiate etl::span of static and dynamic extent.