NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
phmap::Span< T > 模板类 参考

#include <phmap_base.h>

Public 类型

using value_type = phmap::remove_cv_t< T >
 
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 size_type = size_t
 
using difference_type = ptrdiff_t
 

Public 成员函数

constexpr Span () noexcept
 
constexpr Span (pointer array, size_type lgth) 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 pointer data () const noexcept
 
constexpr size_type size () const noexcept
 
constexpr size_type length () const noexcept
 
constexpr bool empty () const noexcept
 
constexpr reference operator[] (size_type i) const noexcept
 
constexpr reference at (size_type i) const
 
constexpr reference front () const noexcept
 
constexpr reference back () const noexcept
 
constexpr iterator begin () const noexcept
 
constexpr const_iterator cbegin () const noexcept
 
constexpr iterator end () const noexcept
 
constexpr const_iterator cend () const noexcept
 
constexpr reverse_iterator rbegin () const noexcept
 
constexpr const_reverse_iterator crbegin () const noexcept
 
constexpr reverse_iterator rend () const noexcept
 
constexpr const_reverse_iterator crend () const noexcept
 
void remove_prefix (size_type n) noexcept
 
void remove_suffix (size_type n) noexcept
 
constexpr Span subspan (size_type pos=0, size_type len=npos) const
 
constexpr Span first (size_type len) const
 
constexpr Span last (size_type len) const
 

静态 Public 属性

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

Private 类型

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 EnableIfConstView = typename std::enable_if< std::is_const< T >::value, U >::type
 
template<typename U >
using EnableIfMutableView = typename std::enable_if<!std::is_const< T >::value, U >::type
 

Private 属性

pointer ptr_
 
size_type len_
 

友元

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

成员类型定义说明

◆ const_iterator

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

◆ const_pointer

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

◆ const_reference

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

◆ const_reverse_iterator

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

◆ difference_type

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

◆ EnableIfConstView

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

◆ EnableIfConvertibleFrom

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

◆ EnableIfMutableView

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

◆ iterator

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

◆ pointer

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

◆ reference

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

◆ reverse_iterator

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

◆ size_type

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

◆ value_type

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

构造及析构函数说明

◆ Span() [1/6]

template<typename T >
constexpr phmap::Span< T >::Span ( )
inlineconstexprnoexcept

◆ Span() [2/6]

template<typename T >
constexpr phmap::Span< T >::Span ( pointer  array,
size_type  lgth 
)
inlineconstexprnoexcept

◆ Span() [3/6]

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

◆ Span() [4/6]

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

◆ Span() [5/6]

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

◆ Span() [6/6]

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

成员函数说明

◆ at()

template<typename T >
constexpr reference phmap::Span< T >::at ( size_type  i) const
inlineconstexpr

◆ back()

template<typename T >
constexpr reference phmap::Span< T >::back ( ) const
inlineconstexprnoexcept

◆ begin()

template<typename T >
constexpr iterator phmap::Span< T >::begin ( ) const
inlineconstexprnoexcept

◆ cbegin()

template<typename T >
constexpr const_iterator phmap::Span< T >::cbegin ( ) const
inlineconstexprnoexcept

◆ cend()

template<typename T >
constexpr const_iterator phmap::Span< T >::cend ( ) const
inlineconstexprnoexcept

◆ crbegin()

template<typename T >
constexpr const_reverse_iterator phmap::Span< T >::crbegin ( ) const
inlineconstexprnoexcept

◆ crend()

template<typename T >
constexpr const_reverse_iterator phmap::Span< T >::crend ( ) const
inlineconstexprnoexcept

◆ data()

template<typename T >
constexpr pointer phmap::Span< T >::data ( ) const
inlineconstexprnoexcept

◆ empty()

template<typename T >
constexpr bool phmap::Span< T >::empty ( ) const
inlineconstexprnoexcept

◆ end()

template<typename T >
constexpr iterator phmap::Span< T >::end ( ) const
inlineconstexprnoexcept

◆ first()

template<typename T >
constexpr Span phmap::Span< T >::first ( size_type  len) const
inlineconstexpr

◆ front()

template<typename T >
constexpr reference phmap::Span< T >::front ( ) const
inlineconstexprnoexcept

◆ last()

template<typename T >
constexpr Span phmap::Span< T >::last ( size_type  len) const
inlineconstexpr

◆ length()

template<typename T >
constexpr size_type phmap::Span< T >::length ( ) const
inlineconstexprnoexcept

◆ operator[]()

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

◆ rbegin()

template<typename T >
constexpr reverse_iterator phmap::Span< T >::rbegin ( ) const
inlineconstexprnoexcept

◆ remove_prefix()

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

◆ remove_suffix()

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

◆ rend()

template<typename T >
constexpr reverse_iterator phmap::Span< T >::rend ( ) const
inlineconstexprnoexcept

◆ size()

template<typename T >
constexpr size_type phmap::Span< T >::size ( ) const
inlineconstexprnoexcept

◆ subspan()

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

友元及相关函数文档

◆ AbslHashValue

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

类成员变量说明

◆ len_

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

◆ npos

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

◆ ptr_

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

该类的文档由以下文件生成: