Loading...
Searching...
No Matches
juce::Span< Value, Extent > Class Template Reference

## Detailed Description

template<typename Value, size_t Extent = dynamicExtent>
class juce::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.

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

- juce_core/containers/juce_Span.h

Inherits juce::detail::NumBase< dynamicExtent >.

## 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 | Span (Span &&) noexcept=default
constexpr Span & | operator= (Span &&) noexcept=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

## Constructors and Destructors

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

juce::Span< Value, Extent >::Span | ( |  | ) |

inline constexpr

Referenced by operator=(), operator=(), Span(), and Span().

## Span() [2/5]

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

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

inline constexpr

References end().

## Span() [3/5]

template<typename Value, size_t Extent = dynamicExtent>
template<typename Range, std::enable_if_t< detail::hasDataAndSize< Range >, int > = 0>

juce::Span< Value, Extent >::Span | ( | Range && | range | ) |

inline constexpr

References data().

## Span() [4/5]

template<typename Value, size_t Extent = dynamicExtent>

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

constexpr default

References Span().

## Span() [5/5]

template<typename Value, size_t Extent = dynamicExtent>

juce::Span< Value, Extent >::Span | ( | Span< Value, Extent > && |  | ) |

constexpr default noexcept

References Span().

## Member Functions

## operator=() [1/2]

template<typename Value, size_t Extent = dynamicExtent>

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

constexpr default

References Span().

## operator=() [2/2]

template<typename Value, size_t Extent = dynamicExtent>

Span & juce::Span< Value, Extent >::operator= | ( | Span< Value, Extent > && |  | ) |

constexpr default noexcept

References Span().

## begin()

template<typename Value, size_t Extent = dynamicExtent>

Value * juce::Span< Value, Extent >::begin | ( |  | ) | const

inline constexpr

References begin().

Referenced by begin(), and juce::MidiDataConcatenator::pushMidiData().

## end()

template<typename Value, size_t Extent = dynamicExtent>

Value * juce::Span< Value, Extent >::end | ( |  | ) | const

inline constexpr

Referenced by juce::MidiDataConcatenator::pushMidiData(), and Span().

## front()

template<typename Value, size_t Extent = dynamicExtent>

auto & juce::Span< Value, Extent >::front | ( |  | ) | const

inline constexpr

## back()

template<typename Value, size_t Extent = dynamicExtent>

auto & juce::Span< Value, Extent >::back | ( |  | ) | const

inline constexpr

## operator[]()

template<typename Value, size_t Extent = dynamicExtent>

auto & juce::Span< Value, Extent >::operator[] | ( | size_t | index | ) | const

inline constexpr

## data()

template<typename Value, size_t Extent = dynamicExtent>

Value * juce::Span< Value, Extent >::data | ( |  | ) | const

inline constexpr

Referenced by juce::BytestreamSysexExtractor::push(), juce::MidiDataConcatenator::pushMidiData(), and Span().

## empty()

template<typename Value, size_t Extent = dynamicExtent>

bool juce::Span< Value, Extent >::empty | ( |  | ) | const

inline constexpr

## Member Data Documentation

## extent

template<typename Value, size_t Extent = dynamicExtent>

auto juce::Span< Value, Extent >::extent = Extent

static constexpr

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited