JUCE: Span< Value, Extent > Class Template Reference

JUCE

- Main Page
- Related Pages
- Topics
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

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 Span & | operator= (const Span &)=default
constexpr Value * | begin () const
constexpr Value * | end () const
constexpr auto & | front () const
constexpr auto & | back () const
constexpr auto & | operator[] (size_t index) const
constexpr Value * | data () 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/4]

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/4]

template<typename Value , size_t Extent = dynamicExtent>
template<typename It >

constexpr Span< Value, Extent >::Span | ( | It | it,
|  | size_t | end
| ) |  |
| constexpr

## ◆ Span() [3/4]

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/4]

template<typename Value , size_t Extent = dynamicExtent>

constexpr Span< Value, Extent >::Span | ( | const Span< Value, Extent > & |  | ) |
| constexprdefault

## Member Function Documentation

## ◆ operator=()

template<typename Value , size_t Extent = dynamicExtent>

constexpr Span & Span< Value, Extent >::operator= | ( | const Span< Value, Extent > & |  | ) |
| constexprdefault

## ◆ 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:

- juce_Span.h