Potato Engine
Hobby Game Engine Project
Public Types | Public Member Functions | List of all members
up::span< T > Struct Template Reference

A non-owning slice of an array. More...

#include <span.h>

Public Types

using value_type = T
 
using iterator = T *
 
using sentinel = T *
 
using pointer = T *
 
using reference = T &
 
using size_type = std::size_t
 
using index_type = size_type
 

Public Member Functions

constexpr span (span const &) noexcept=default
 
constexpr span (span &&) noexcept=default
 
template<typename U >
constexpr span (span< U > src) noexcept
 
constexpr span (T *begin, T *end) noexcept
 
constexpr span (T *ptr, std::size_t size) noexcept
 
template<std::size_t N>
constexpr span (T(&src)[N]) noexcept
 
template<std::size_t N>
constexpr span (std::array< T, N > const &array) noexcept
 
template<std::size_t N>
constexpr span (std::array< T, N > &array) noexcept
 
constexpr spanoperator= (span &&) noexcept=default
 
constexpr iterator begin () const noexcept
 
constexpr sentinel end () const noexcept
 
constexpr pointer data () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr operator bool () const noexcept
 
constexpr reference operator[] (size_type index) const noexcept
 
constexpr size_type size () const noexcept
 
constexpr reference front () const noexcept
 
constexpr reference back () const noexcept
 
constexpr span first (size_type length) const noexcept
 
constexpr span last (size_type length) const noexcept
 
constexpr span subspan (size_type offset, size_type count) const noexcept
 
auto as_bytes () const noexcept
 
auto as_chars () const noexcept
 
constexpr void pop_front () noexcept
 
constexpr void pop_back () noexcept
 

Detailed Description

template<typename T>
struct up::span< T >

A non-owning slice of an array.

Template Parameters
TType of the elements in the array.

The documentation for this struct was generated from the following file: