LibreOffice Module o3tl (master)  1
Public Types | Public Member Functions | Private Attributes | List of all members
o3tl::span< T > Class Template Reference

A barebones approximation of C++20 . More...

#include <span.hxx>

Inheritance diagram for o3tl::span< T >:
[legend]

Public Types

using value_type = T
 
using pointer = value_type *
 
using const_pointer = value_type const *
 
using reference = value_type &
 
using const_reference = value_type const &
 
using const_iterator = const_pointer
 
using iterator = pointer
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

constexpr span () noexcept
 
template<std::size_t N>
constexpr span (T(&a)[N]) noexcept
 
constexpr span (T *a, size_type len) noexcept
 
constexpr bool empty () const noexcept
 
constexpr iterator begin () const noexcept
 
constexpr iterator end () const noexcept
 
reverse_iterator rbegin () const noexcept
 
reverse_iterator rend () const noexcept
 
constexpr size_type size () const noexcept
 
constexpr reference operator[] (size_type pos) const
 
constexpr pointer data () const noexcept
 

Private Attributes

pointer data_
 
size_type size_
 

Detailed Description

template<typename T>
class o3tl::span< T >

A barebones approximation of C++20 .

Definition at line 34 of file span.hxx.

Member Typedef Documentation

template<typename T>
using o3tl::span< T >::const_iterator = const_pointer

Definition at line 41 of file span.hxx.

template<typename T>
using o3tl::span< T >::const_pointer = value_type const *

Definition at line 38 of file span.hxx.

template<typename T>
using o3tl::span< T >::const_reference = value_type const &

Definition at line 40 of file span.hxx.

template<typename T>
using o3tl::span< T >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 43 of file span.hxx.

template<typename T>
using o3tl::span< T >::difference_type = std::ptrdiff_t

Definition at line 46 of file span.hxx.

template<typename T>
using o3tl::span< T >::iterator = pointer

Definition at line 42 of file span.hxx.

template<typename T>
using o3tl::span< T >::pointer = value_type *

Definition at line 37 of file span.hxx.

template<typename T>
using o3tl::span< T >::reference = value_type &

Definition at line 39 of file span.hxx.

template<typename T>
using o3tl::span< T >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 44 of file span.hxx.

template<typename T>
using o3tl::span< T >::size_type = std::size_t

Definition at line 45 of file span.hxx.

template<typename T>
using o3tl::span< T >::value_type = T

Definition at line 36 of file span.hxx.

Constructor & Destructor Documentation

template<typename T>
constexpr o3tl::span< T >::span ( )
inlinenoexcept

Definition at line 48 of file span.hxx.

template<typename T>
template<std::size_t N>
constexpr o3tl::span< T >::span ( T(&)  a[N])
inlinenoexcept

Definition at line 51 of file span.hxx.

template<typename T>
constexpr o3tl::span< T >::span ( T *  a,
size_type  len 
)
inlinenoexcept

Definition at line 53 of file span.hxx.

Member Function Documentation

template<typename T>
constexpr iterator o3tl::span< T >::begin ( ) const
inlinenoexcept
template<typename T>
constexpr pointer o3tl::span< T >::data ( ) const
inlinenoexcept

Definition at line 77 of file span.hxx.

template<typename T>
constexpr bool o3tl::span< T >::empty ( ) const
inlinenoexcept

Definition at line 60 of file span.hxx.

template<typename T>
constexpr iterator o3tl::span< T >::end ( ) const
inlinenoexcept

Definition at line 63 of file span.hxx.

Referenced by o3tl::span< sal_uInt16 const >::rbegin().

template<typename T>
constexpr reference o3tl::span< T >::operator[] ( size_type  pos) const
inline

Definition at line 72 of file span.hxx.

template<typename T>
reverse_iterator o3tl::span< T >::rbegin ( ) const
inlinenoexcept

Definition at line 65 of file span.hxx.

template<typename T>
reverse_iterator o3tl::span< T >::rend ( ) const
inlinenoexcept

Definition at line 67 of file span.hxx.

template<typename T>
constexpr size_type o3tl::span< T >::size ( ) const
inlinenoexcept

Member Data Documentation

template<typename T>
pointer o3tl::span< T >::data_
private
template<typename T>
size_type o3tl::span< T >::size_
private

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