Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSpan< T, E > Class Template Reference

#include <qspan.h>

+ Inheritance diagram for QSpan< T, E >:
+ Collaboration diagram for QSpan< T, E >:

Public Types

using value_type = std::remove_cv_t<T>
 
using size_type = qsizetype
 
using difference_type = qptrdiff
 
using pointer = T*
 
using const_pointer = const T*
 
using reference = T&
 
using const_reference = const T&
 
using iterator = pointer
 
using const_iterator = const_pointer
 
using reverse_iterator = std::reverse_iterator<iterator>
 
using const_reverse_iterator = std::reverse_iterator<const_iterator>
 
using Base
 

Public Member Functions

constexpr size_type size () const noexcept
 
constexpr size_type size_bytes () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr reference operator[] (size_type idx) const
 
constexpr reference front () const
 
constexpr reference back () const
 
constexpr pointer data () const noexcept
 
constexpr iterator begin () const noexcept
 
constexpr iterator end () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr const_iterator cend () const noexcept
 
constexpr reverse_iterator rbegin () const noexcept
 
constexpr reverse_iterator rend () const noexcept
 
constexpr const_reverse_iterator crbegin () const noexcept
 
constexpr const_reverse_iterator crend () const noexcept
 
template<std::size_t Count>
constexpr QSpan< T, Count > first () const noexcept(subspan_always_succeeds_v< Count >)
 
template<std::size_t Count>
constexpr QSpan< T, Count > last () const noexcept(subspan_always_succeeds_v< Count >)
 
template<std::size_t Offset>
constexpr auto subspan () const noexcept(subspan_always_succeeds_v< Offset >)
 
template<std::size_t Offset, std::size_t Count>
constexpr auto subspan () const noexcept(subspan_always_succeeds_v< Offset+Count >)
 
constexpr QSpan< T > first (size_type n) const
 
constexpr QSpan< T > last (size_type n) const
 
constexpr QSpan< T > subspan (size_type pos) const
 
constexpr QSpan< T > subspan (size_type pos, size_type n) const
 
bool isEmpty () const noexcept
 
constexpr QSpan< T > sliced (size_type pos) const
 
constexpr QSpan< T > sliced (size_type pos, size_type n) const
 

Static Public Attributes

static constexpr std::size_t extent = E
 

Detailed Description

template<typename T, std::size_t E>
class QSpan< T, E >

Definition at line 311 of file qspan.h.

Member Typedef Documentation

◆ Base

template<typename T , std::size_t E>
using QSpanPrivate::QSpanBase< T, E >::Base

Definition at line 175 of file qspan.h.

◆ const_iterator

template<typename T , std::size_t E>
using QSpan< T, E >::const_iterator = const_pointer

Definition at line 342 of file qspan.h.

◆ const_pointer

template<typename T , std::size_t E>
using QSpan< T, E >::const_pointer = const T*

Definition at line 338 of file qspan.h.

◆ const_reference

template<typename T , std::size_t E>
using QSpan< T, E >::const_reference = const T&

Definition at line 340 of file qspan.h.

◆ const_reverse_iterator

template<typename T , std::size_t E>
using QSpan< T, E >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 344 of file qspan.h.

◆ difference_type

template<typename T , std::size_t E>
using QSpan< T, E >::difference_type = qptrdiff

Definition at line 336 of file qspan.h.

◆ iterator

template<typename T , std::size_t E>
using QSpan< T, E >::iterator = pointer

Definition at line 341 of file qspan.h.

◆ pointer

template<typename T , std::size_t E>
using QSpan< T, E >::pointer = T*

Definition at line 337 of file qspan.h.

◆ reference

template<typename T , std::size_t E>
using QSpan< T, E >::reference = T&

Definition at line 339 of file qspan.h.

◆ reverse_iterator

template<typename T , std::size_t E>
using QSpan< T, E >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 343 of file qspan.h.

◆ size_type

template<typename T , std::size_t E>
using QSpan< T, E >::size_type = qsizetype

Definition at line 335 of file qspan.h.

◆ value_type

template<typename T , std::size_t E>
using QSpan< T, E >::value_type = std::remove_cv_t<T>

Definition at line 330 of file qspan.h.

Member Function Documentation

◆ back()

template<typename T , std::size_t E>
constexpr reference QSpan< T, E >::back ( ) const
inlineconstexpr

Definition at line 373 of file qspan.h.

References QSpan< T, E >::data(), and QSpan< T, E >::size().

+ Here is the call graph for this function:

◆ begin()

template<typename T , std::size_t E>
constexpr iterator QSpan< T, E >::begin ( ) const
inlineconstexprnoexcept

Definition at line 377 of file qspan.h.

References QSpan< T, E >::data().

Referenced by QSpan< T, E >::cbegin(), and QSpan< T, E >::rend().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cbegin()

template<typename T , std::size_t E>
constexpr const_iterator QSpan< T, E >::cbegin ( ) const
inlineconstexprnoexcept

Definition at line 379 of file qspan.h.

References QSpan< T, E >::begin().

+ Here is the call graph for this function:

◆ cend()

template<typename T , std::size_t E>
constexpr const_iterator QSpan< T, E >::cend ( ) const
inlineconstexprnoexcept

Definition at line 380 of file qspan.h.

References QSpan< T, E >::end().

+ Here is the call graph for this function:

◆ crbegin()

template<typename T , std::size_t E>
constexpr const_reverse_iterator QSpan< T, E >::crbegin ( ) const
inlineconstexprnoexcept

Definition at line 383 of file qspan.h.

References QSpan< T, E >::rbegin().

+ Here is the call graph for this function:

◆ crend()

template<typename T , std::size_t E>
constexpr const_reverse_iterator QSpan< T, E >::crend ( ) const
inlineconstexprnoexcept

Definition at line 384 of file qspan.h.

References QSpan< T, E >::rend().

+ Here is the call graph for this function:

◆ data()

template<typename T , std::size_t E>
constexpr pointer QSpan< T, E >::data ( ) const
inlineconstexprnoexcept

Definition at line 374 of file qspan.h.

References QSpanPrivate::QSpanBase< T, E >::m_data.

Referenced by QSpan< T, E >::back(), QSpan< T, E >::begin(), QSpan< T, E >::end(), QSpan< T, E >::first(), QSpan< T, E >::first(), QSpan< T, E >::front(), QSpan< T, E >::last(), QSpan< T, E >::last(), QSpan< T, E >::operator[](), QSpan< T, E >::subspan(), and QSpan< T, E >::subspan().

+ Here is the caller graph for this function:

◆ empty()

template<typename T , std::size_t E>
constexpr bool QSpan< T, E >::empty ( ) const
inlineconstexprnoexcept

Definition at line 367 of file qspan.h.

References QSpan< T, E >::size().

Referenced by QSpan< T, E >::isEmpty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ end()

template<typename T , std::size_t E>
constexpr iterator QSpan< T, E >::end ( ) const
inlineconstexprnoexcept

Definition at line 378 of file qspan.h.

References QSpan< T, E >::data(), and QSpan< T, E >::size().

Referenced by QSpan< T, E >::cend(), and QSpan< T, E >::rbegin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ first() [1/2]

template<typename T , std::size_t E>
template<std::size_t Count>
constexpr QSpan< T, Count > QSpan< T, E >::first ( ) const
inlineconstexprnoexcept

Definition at line 388 of file qspan.h.

References QSpan< T, E >::data(), and E.

+ Here is the call graph for this function:

◆ first() [2/2]

template<typename T , std::size_t E>
constexpr QSpan< T > QSpan< T, E >::first ( size_type n) const
inlineconstexpr

Definition at line 425 of file qspan.h.

References QSpan< T, E >::data().

+ Here is the call graph for this function:

◆ front()

template<typename T , std::size_t E>
constexpr reference QSpan< T, E >::front ( ) const
inlineconstexpr

Definition at line 372 of file qspan.h.

References QSpan< T, E >::data().

+ Here is the call graph for this function:

◆ isEmpty()

template<typename T , std::size_t E>
bool QSpan< T, E >::isEmpty ( ) const
inlinenoexcept

Definition at line 431 of file qspan.h.

References QSpan< T, E >::empty().

+ Here is the call graph for this function:

◆ last() [1/2]

template<typename T , std::size_t E>
template<std::size_t Count>
constexpr QSpan< T, Count > QSpan< T, E >::last ( ) const
inlineconstexprnoexcept

Definition at line 398 of file qspan.h.

References QSpan< T, E >::data(), E, and QSpan< T, E >::size().

+ Here is the call graph for this function:

◆ last() [2/2]

template<typename T , std::size_t E>
constexpr QSpan< T > QSpan< T, E >::last ( size_type n) const
inlineconstexpr

Definition at line 426 of file qspan.h.

References QSpan< T, E >::data(), and QSpan< T, E >::size().

+ Here is the call graph for this function:

◆ operator[]()

template<typename T , std::size_t E>
constexpr reference QSpan< T, E >::operator[] ( size_type idx) const
inlineconstexpr

Definition at line 370 of file qspan.h.

References QSpan< T, E >::data().

+ Here is the call graph for this function:

◆ rbegin()

template<typename T , std::size_t E>
constexpr reverse_iterator QSpan< T, E >::rbegin ( ) const
inlineconstexprnoexcept

Definition at line 381 of file qspan.h.

References QSpan< T, E >::end().

Referenced by QSpan< T, E >::crbegin().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rend()

template<typename T , std::size_t E>
constexpr reverse_iterator QSpan< T, E >::rend ( ) const
inlineconstexprnoexcept

Definition at line 382 of file qspan.h.

References QSpan< T, E >::begin().

Referenced by QSpan< T, E >::crend().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ size()

template<typename T , std::size_t E>
constexpr size_type QSpan< T, E >::size ( ) const
inlineconstexprnoexcept

Definition at line 365 of file qspan.h.

References QSpanPrivate::QSpanBase< T, E >::m_size.

Referenced by QSpan< T, E >::back(), QSpan< T, E >::empty(), QSpan< T, E >::end(), QSpan< T, E >::last(), QSpan< T, E >::last(), QSpan< T, E >::size_bytes(), QSpan< T, E >::subspan(), and QSpan< T, E >::subspan().

+ Here is the caller graph for this function:

◆ size_bytes()

template<typename T , std::size_t E>
constexpr size_type QSpan< T, E >::size_bytes ( ) const
inlineconstexprnoexcept

Definition at line 366 of file qspan.h.

References QSpan< T, E >::size().

+ Here is the call graph for this function:

◆ sliced() [1/2]

template<typename T , std::size_t E>
constexpr QSpan< T > QSpan< T, E >::sliced ( size_type pos) const
inlineconstexpr

Definition at line 433 of file qspan.h.

References pos, and QSpan< T, E >::subspan().

+ Here is the call graph for this function:

◆ sliced() [2/2]

template<typename T , std::size_t E>
constexpr QSpan< T > QSpan< T, E >::sliced ( size_type pos,
size_type n ) const
inlineconstexpr

Definition at line 434 of file qspan.h.

References pos, and QSpan< T, E >::subspan().

+ Here is the call graph for this function:

◆ subspan() [1/4]

template<typename T , std::size_t E>
template<std::size_t Offset>
constexpr auto QSpan< T, E >::subspan ( ) const
inlineconstexprnoexcept

Definition at line 408 of file qspan.h.

References QSpan< T, E >::data(), q20::dynamic_extent, E, and QSpan< T, E >::size().

Referenced by QSpan< T, E >::sliced(), and QSpan< T, E >::sliced().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ subspan() [2/4]

template<typename T , std::size_t E>
template<std::size_t Offset, std::size_t Count>
constexpr auto QSpan< T, E >::subspan ( ) const
inlineconstexprnoexcept

Definition at line 421 of file qspan.h.

◆ subspan() [3/4]

template<typename T , std::size_t E>
constexpr QSpan< T > QSpan< T, E >::subspan ( size_type pos) const
inlineconstexpr

Definition at line 427 of file qspan.h.

References QSpan< T, E >::data(), pos, and QSpan< T, E >::size().

+ Here is the call graph for this function:

◆ subspan() [4/4]

template<typename T , std::size_t E>
constexpr QSpan< T > QSpan< T, E >::subspan ( size_type pos,
size_type n ) const
inlineconstexpr

Definition at line 428 of file qspan.h.

References pos, and QSpan< T, E >::subspan().

Referenced by QSpan< T, E >::subspan().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ extent

template<typename T , std::size_t E>
constexpr std::size_t QSpan< T, E >::extent = E
staticconstexpr

Definition at line 345 of file qspan.h.


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