libcopp  2.2.0
Public Types | Public Member Functions | Static Public Attributes | Private Attributes
gsl::span< T, dynamic_extent > Class Template Reference

#include <span.h>

Collaboration diagram for gsl::span< T, dynamic_extent >:
Collaboration graph

Public Types

using element_type = T
 
using value_type = typename std::remove_cv< T >::type
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 
using pointer = T *
 
using const_pointer = const T *
 
using reference = T &
 
using const_reference = const T &
 
using iterator = T *
 
using reverse_iterator = std::reverse_iterator< iterator >
 

Public Member Functions

 span () noexcept
 
 span (T *input_data, size_t count) noexcept
 
 span (T *first, T *last) noexcept
 
template<size_t N>
 span (T(&array)[N]) noexcept
 
template<size_t N>
 span (std::array< T, N > &array) noexcept
 
template<size_t N>
 span (const std::array< T, N > &array) noexcept
 
template<class C , typename std::enable_if< !detail::is_specialized_span_convertible< typename std::decay< C >::type >::value &&std::is_convertible< typename std::remove_pointer< decltype(std::declval< C >().data())>::type(*)[], T(*)[]>::value &&std::is_convertible< decltype(std::declval< C >().size()), size_t >::value , ::type * = nullptr>
 span (C &&c) noexcept(noexcept(c.data(), c.size()))
 
template<class U , size_t N, typename std::enable_if< std::is_convertible< U(*)[], T(*)[]>::value >::type * = nullptr>
 span (const span< U, N > &other) noexcept
 
 span (const span &) noexcept=default
 
bool empty () const noexcept
 
T * data () const noexcept
 
size_t size () const noexcept
 
T & operator[] (size_t index) const noexcept
 
T * begin () const noexcept
 
T * end () const noexcept
 

Static Public Attributes

static constexpr size_t extent = dynamic_extent
 

Private Attributes

size_t extent_
 
T * data_
 

Detailed Description

template<class T>
class gsl::span< T, dynamic_extent >

Definition at line 179 of file span.h.

Member Typedef Documentation

◆ const_pointer

template<class T >
using gsl::span< T, dynamic_extent >::const_pointer = const T *

Definition at line 187 of file span.h.

◆ const_reference

template<class T >
using gsl::span< T, dynamic_extent >::const_reference = const T &

Definition at line 189 of file span.h.

◆ difference_type

template<class T >
using gsl::span< T, dynamic_extent >::difference_type = std::ptrdiff_t

Definition at line 185 of file span.h.

◆ element_type

template<class T >
using gsl::span< T, dynamic_extent >::element_type = T

Definition at line 182 of file span.h.

◆ iterator

template<class T >
using gsl::span< T, dynamic_extent >::iterator = T *

Definition at line 190 of file span.h.

◆ pointer

template<class T >
using gsl::span< T, dynamic_extent >::pointer = T *

Definition at line 186 of file span.h.

◆ reference

template<class T >
using gsl::span< T, dynamic_extent >::reference = T &

Definition at line 188 of file span.h.

◆ reverse_iterator

template<class T >
using gsl::span< T, dynamic_extent >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 191 of file span.h.

◆ size_type

template<class T >
using gsl::span< T, dynamic_extent >::size_type = std::size_t

Definition at line 184 of file span.h.

◆ value_type

template<class T >
using gsl::span< T, dynamic_extent >::value_type = typename std::remove_cv<T>::type

Definition at line 183 of file span.h.

Constructor & Destructor Documentation

◆ span() [1/9]

template<class T >
gsl::span< T, dynamic_extent >::span ( )
inlinenoexcept

Definition at line 193 of file span.h.

◆ span() [2/9]

template<class T >
gsl::span< T, dynamic_extent >::span ( T *  input_data,
size_t  count 
)
inlinenoexcept

Definition at line 195 of file span.h.

◆ span() [3/9]

template<class T >
gsl::span< T, dynamic_extent >::span ( T *  first,
T *  last 
)
inlinenoexcept

Definition at line 197 of file span.h.

◆ span() [4/9]

template<class T >
template<size_t N>
gsl::span< T, dynamic_extent >::span ( T(&)  array[N])
inlinenoexcept

Definition at line 202 of file span.h.

◆ span() [5/9]

template<class T >
template<size_t N>
gsl::span< T, dynamic_extent >::span ( std::array< T, N > &  array)
inlinenoexcept

Definition at line 205 of file span.h.

◆ span() [6/9]

template<class T >
template<size_t N>
gsl::span< T, dynamic_extent >::span ( const std::array< T, N > &  array)
inlinenoexcept

Definition at line 208 of file span.h.

◆ span() [7/9]

template<class T >
template<class C , typename std::enable_if< !detail::is_specialized_span_convertible< typename std::decay< C >::type >::value &&std::is_convertible< typename std::remove_pointer< decltype(std::declval< C >().data())>::type(*)[], T(*)[]>::value &&std::is_convertible< decltype(std::declval< C >().size()), size_t >::value , ::type * = nullptr>
gsl::span< T, dynamic_extent >::span ( C &&  c)
inlinenoexcept

Definition at line 216 of file span.h.

◆ span() [8/9]

template<class T >
template<class U , size_t N, typename std::enable_if< std::is_convertible< U(*)[], T(*)[]>::value >::type * = nullptr>
gsl::span< T, dynamic_extent >::span ( const span< U, N > &  other)
inlinenoexcept

Definition at line 219 of file span.h.

◆ span() [9/9]

template<class T >
gsl::span< T, dynamic_extent >::span ( const span< T, dynamic_extent > &  )
defaultnoexcept

Member Function Documentation

◆ begin()

template<class T >
T* gsl::span< T, dynamic_extent >::begin ( ) const
inlinenoexcept

Definition at line 234 of file span.h.

References gsl::span< T, EXTENT >::data_.

◆ data()

template<class T >
T* gsl::span< T, dynamic_extent >::data ( ) const
inlinenoexcept

Definition at line 225 of file span.h.

References gsl::span< T, EXTENT >::data_.

◆ empty()

template<class T >
bool gsl::span< T, dynamic_extent >::empty ( ) const
inlinenoexcept

Definition at line 223 of file span.h.

◆ end()

template<class T >
T* gsl::span< T, dynamic_extent >::end ( ) const
inlinenoexcept

Definition at line 236 of file span.h.

References gsl::span< T, EXTENT >::data_.

◆ operator[]()

template<class T >
T& gsl::span< T, dynamic_extent >::operator[] ( size_t  index) const
inlinenoexcept

Definition at line 229 of file span.h.

References gsl::span< T, EXTENT >::data_.

◆ size()

template<class T >
size_t gsl::span< T, dynamic_extent >::size ( ) const
inlinenoexcept

Definition at line 227 of file span.h.

Field Documentation

◆ data_

template<class T >
T* gsl::span< T, dynamic_extent >::data_
private

Definition at line 243 of file span.h.

◆ extent

template<class T >
constexpr size_t gsl::span< T, dynamic_extent >::extent = dynamic_extent
staticconstexpr

Definition at line 181 of file span.h.

◆ extent_

template<class T >
size_t gsl::span< T, dynamic_extent >::extent_
private

Definition at line 242 of file span.h.


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