Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
Span< Value, Extent > Class Template Reference

A non-owning view over contiguous objects stored in an Array or vector or other similar container. More...

#include <juce_Span.h>

Inherits detail::NumBase< Extent >.

Public Member Functions

template<size_t e = extent, std::enable_if_t< e==0||e==dynamicExtent, int > = 0>
constexpr Span ()
 
template<typename It >
constexpr Span (It it, size_t end)
 
template<typename Range , std::enable_if_t< detail::hasDataAndSize< Range >, int > = 0>
constexpr Span (Range &&range)
 
constexpr Span (const Span &)=default
 
constexpr Spanoperator= (const Span &)=default
 
constexpr Span (Span &&) noexcept=default
 
constexpr Spanoperator= (Span &&) noexcept=default
 
constexpr Valuebegin () const
 
constexpr Valueend () const
 
constexpr auto & front () const
 
constexpr auto & back () const
 
constexpr auto & operator[] (size_t index) const
 
constexpr Valuedata () const
 
constexpr bool empty () const
 

Static Public Attributes

static constexpr auto extent = Extent
 

Detailed Description

template<typename Value, size_t Extent = dynamicExtent>
class Span< Value, Extent >

A non-owning view over contiguous objects stored in an Array or vector or other similar container.

This is a bit like std::span from C++20, but with a more limited interface.

Constructor & Destructor Documentation

◆ Span() [1/5]

template<typename Value , size_t Extent = dynamicExtent>
template<size_t e = extent, std::enable_if_t< e==0||e==dynamicExtent, int > = 0>
constexpr Span< Value, Extent >::Span ( )
constexpr

◆ Span() [2/5]

template<typename Value , size_t Extent = dynamicExtent>
template<typename It >
constexpr Span< Value, Extent >::Span ( It it,
size_t end )
constexpr

◆ Span() [3/5]

template<typename Value , size_t Extent = dynamicExtent>
template<typename Range , std::enable_if_t< detail::hasDataAndSize< Range >, int > = 0>
constexpr Span< Value, Extent >::Span ( Range && range)
constexpr

◆ Span() [4/5]

template<typename Value , size_t Extent = dynamicExtent>
constexpr Span< Value, Extent >::Span ( const Span< Value, Extent > & )
constexprdefault

◆ Span() [5/5]

template<typename Value , size_t Extent = dynamicExtent>
constexpr Span< Value, Extent >::Span ( Span< Value, Extent > && )
constexprdefaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

template<typename Value , size_t Extent = dynamicExtent>
constexpr Span & Span< Value, Extent >::operator= ( const Span< Value, Extent > & )
constexprdefault

◆ operator=() [2/2]

template<typename Value , size_t Extent = dynamicExtent>
constexpr Span & Span< Value, Extent >::operator= ( Span< Value, Extent > && )
constexprdefaultnoexcept

◆ begin()

template<typename Value , size_t Extent = dynamicExtent>
constexpr Value * Span< Value, Extent >::begin ( ) const
constexpr

◆ end()

template<typename Value , size_t Extent = dynamicExtent>
constexpr Value * Span< Value, Extent >::end ( ) const
constexpr

◆ front()

template<typename Value , size_t Extent = dynamicExtent>
constexpr auto & Span< Value, Extent >::front ( ) const
constexpr

◆ back()

template<typename Value , size_t Extent = dynamicExtent>
constexpr auto & Span< Value, Extent >::back ( ) const
constexpr

◆ operator[]()

template<typename Value , size_t Extent = dynamicExtent>
constexpr auto & Span< Value, Extent >::operator[] ( size_t index) const
constexpr

◆ data()

template<typename Value , size_t Extent = dynamicExtent>
constexpr Value * Span< Value, Extent >::data ( ) const
constexpr

◆ empty()

template<typename Value , size_t Extent = dynamicExtent>
constexpr bool Span< Value, Extent >::empty ( ) const
constexpr

Member Data Documentation

◆ extent

template<typename Value , size_t Extent = dynamicExtent>
constexpr auto Span< Value, Extent >::extent = Extent
staticconstexpr

The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram