Public Types | Public Member Functions | Static Public Attributes | Private Types | Private Attributes | Friends | List of all members
absl::Span< T > Class Template Reference

#include <span.h>

Public Types

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

Public Member Functions

constexpr reference at (size_type i) const
 
constexpr reference back () const noexcept
 
constexpr iterator begin () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr const_iterator cend () const noexcept
 
constexpr const_reverse_iterator crbegin () const noexcept
 
constexpr const_reverse_iterator crend () const noexcept
 
constexpr pointer data () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr iterator end () const noexcept
 
constexpr Span first (size_type len) const
 
constexpr reference front () const noexcept
 
constexpr Span last (size_type len) const
 
constexpr size_type length () const noexcept
 
constexpr reference operator[] (size_type i) const noexcept
 
constexpr reverse_iterator rbegin () const noexcept
 
void remove_prefix (size_type n) noexcept
 
void remove_suffix (size_type n) noexcept
 
constexpr reverse_iterator rend () const noexcept
 
constexpr size_type size () const noexcept
 
constexpr Span () noexcept
 
constexpr Span (pointer array, size_type length) noexcept
 
template<size_t N>
constexpr Span (T(&a)[N]) noexcept
 
template<typename V , typename = EnableIfConvertibleFrom<V>, typename = EnableIfMutableView<V>>
 Span (V &v) noexcept
 
template<typename V , typename = EnableIfConvertibleFrom<V>, typename = EnableIfConstView<V>>
constexpr Span (const V &v) noexcept
 
template<typename LazyT = T, typename = EnableIfConstView<LazyT>>
 Span (std::initializer_list< value_type > v) noexcept
 
constexpr Span subspan (size_type pos=0, size_type len=npos) const
 

Static Public Attributes

static const size_type npos = ~(size_type(0))
 

Private Types

template<typename U >
using EnableIfConstView = typename std::enable_if< std::is_const< T >::value, U >::type
 
template<typename C >
using EnableIfConvertibleFrom = typename std::enable_if< span_internal::HasData< T, C >::value &&span_internal::HasSize< C >::value >::type
 
template<typename U >
using EnableIfMutableView = typename std::enable_if<!std::is_const< T >::value, U >::type
 

Private Attributes

size_type len_
 
pointer ptr_
 

Friends

template<typename H >
AbslHashValue (H h, Span v)
 

Detailed Description

template<typename T>
class absl::Span< T >

Definition at line 153 of file span.h.

Member Typedef Documentation

template<typename T>
using absl::Span< T >::const_iterator = const_pointer

Definition at line 179 of file span.h.

template<typename T>
using absl::Span< T >::const_pointer = const T*

Definition at line 175 of file span.h.

template<typename T>
using absl::Span< T >::const_reference = const T&

Definition at line 177 of file span.h.

template<typename T>
using absl::Span< T >::const_reverse_iterator = std::reverse_iterator<const_iterator>

Definition at line 181 of file span.h.

template<typename T>
using absl::Span< T >::difference_type = ptrdiff_t

Definition at line 183 of file span.h.

template<typename T>
template<typename U >
using absl::Span< T >::EnableIfConstView = typename std::enable_if<std::is_const<T>::value, U>::type
private

Definition at line 165 of file span.h.

template<typename T>
template<typename C >
using absl::Span< T >::EnableIfConvertibleFrom = typename std::enable_if<span_internal::HasData<T, C>::value && span_internal::HasSize<C>::value>::type
private

Definition at line 160 of file span.h.

template<typename T>
template<typename U >
using absl::Span< T >::EnableIfMutableView = typename std::enable_if<!std::is_const<T>::value, U>::type
private

Definition at line 170 of file span.h.

template<typename T>
using absl::Span< T >::iterator = pointer

Definition at line 178 of file span.h.

template<typename T>
using absl::Span< T >::pointer = T*

Definition at line 174 of file span.h.

template<typename T>
using absl::Span< T >::reference = T&

Definition at line 176 of file span.h.

template<typename T>
using absl::Span< T >::reverse_iterator = std::reverse_iterator<iterator>

Definition at line 180 of file span.h.

template<typename T>
using absl::Span< T >::size_type = size_t

Definition at line 182 of file span.h.

template<typename T>
using absl::Span< T >::value_type = absl::remove_cv_t<T>

Definition at line 173 of file span.h.

Constructor & Destructor Documentation

template<typename T>
constexpr absl::Span< T >::Span ( )
inlinenoexcept

Definition at line 187 of file span.h.

template<typename T>
constexpr absl::Span< T >::Span ( pointer  array,
size_type  length 
)
inlinenoexcept

Definition at line 188 of file span.h.

template<typename T>
template<size_t N>
constexpr absl::Span< T >::Span ( T(&)  a[N])
inlinenoexcept

Definition at line 193 of file span.h.

template<typename T>
template<typename V , typename = EnableIfConvertibleFrom<V>, typename = EnableIfMutableView<V>>
absl::Span< T >::Span ( V &  v)
inlineexplicitnoexcept

Definition at line 200 of file span.h.

template<typename T>
template<typename V , typename = EnableIfConvertibleFrom<V>, typename = EnableIfConstView<V>>
constexpr absl::Span< T >::Span ( const V &  v)
inlinenoexcept

Definition at line 206 of file span.h.

template<typename T>
template<typename LazyT = T, typename = EnableIfConstView<LazyT>>
absl::Span< T >::Span ( std::initializer_list< value_type v)
inlinenoexcept

Definition at line 246 of file span.h.

Member Function Documentation

template<typename T>
constexpr reference absl::Span< T >::at ( size_type  i) const
inline

Definition at line 284 of file span.h.

template<typename T>
constexpr reference absl::Span< T >::back ( ) const
inlinenoexcept

Definition at line 302 of file span.h.

template<typename T>
constexpr iterator absl::Span< T >::begin ( ) const
inlinenoexcept

Definition at line 309 of file span.h.

template<typename T>
constexpr const_iterator absl::Span< T >::cbegin ( ) const
inlinenoexcept

Definition at line 314 of file span.h.

template<typename T>
constexpr const_iterator absl::Span< T >::cend ( ) const
inlinenoexcept

Definition at line 324 of file span.h.

template<typename T>
constexpr const_reverse_iterator absl::Span< T >::crbegin ( ) const
inlinenoexcept

Definition at line 336 of file span.h.

template<typename T>
constexpr const_reverse_iterator absl::Span< T >::crend ( ) const
inlinenoexcept

Definition at line 348 of file span.h.

template<typename T>
constexpr pointer absl::Span< T >::data ( ) const
inlinenoexcept

Definition at line 256 of file span.h.

template<typename T>
constexpr bool absl::Span< T >::empty ( ) const
inlinenoexcept

Definition at line 271 of file span.h.

template<typename T>
constexpr iterator absl::Span< T >::end ( ) const
inlinenoexcept

Definition at line 319 of file span.h.

template<typename T>
constexpr Span absl::Span< T >::first ( size_type  len) const
inline

Definition at line 402 of file span.h.

template<typename T>
constexpr reference absl::Span< T >::front ( ) const
inlinenoexcept

Definition at line 295 of file span.h.

template<typename T>
constexpr Span absl::Span< T >::last ( size_type  len) const
inline

Definition at line 419 of file span.h.

template<typename T>
constexpr size_type absl::Span< T >::length ( ) const
inlinenoexcept

Definition at line 266 of file span.h.

template<typename T>
constexpr reference absl::Span< T >::operator[] ( size_type  i) const
inlinenoexcept

Definition at line 276 of file span.h.

template<typename T>
constexpr reverse_iterator absl::Span< T >::rbegin ( ) const
inlinenoexcept

Definition at line 329 of file span.h.

template<typename T>
void absl::Span< T >::remove_prefix ( size_type  n)
inlinenoexcept

Definition at line 355 of file span.h.

template<typename T>
void absl::Span< T >::remove_suffix ( size_type  n)
inlinenoexcept

Definition at line 364 of file span.h.

template<typename T>
constexpr reverse_iterator absl::Span< T >::rend ( ) const
inlinenoexcept

Definition at line 341 of file span.h.

template<typename T>
constexpr size_type absl::Span< T >::size ( ) const
inlinenoexcept

Definition at line 261 of file span.h.

template<typename T>
constexpr Span absl::Span< T >::subspan ( size_type  pos = 0,
size_type  len = npos 
) const
inline

Definition at line 385 of file span.h.

Friends And Related Function Documentation

template<typename T>
template<typename H >
H AbslHashValue ( h,
Span< T >  v 
)
friend

Definition at line 427 of file span.h.

Member Data Documentation

template<typename T>
size_type absl::Span< T >::len_
private

Definition at line 434 of file span.h.

template<typename T>
const Span< T >::size_type absl::Span< T >::npos = ~(size_type(0))
static

Definition at line 185 of file span.h.

template<typename T>
pointer absl::Span< T >::ptr_
private

Definition at line 433 of file span.h.


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


abseil_cpp
Author(s):
autogenerated on Tue Jun 18 2019 19:44:38