NIM PC Cross Platform SDK
载入中...
搜索中...
未找到
phmap::span_internal 命名空间参考

struct  ElementType
 
struct  ElementType< T(&)[N]>
 
struct  IsConvertible
 
struct  IsConvertibleHelper
 

类型定义

template<typename C >
using HasSize = std::is_integral< phmap::decay_t< decltype(std::declval< C & >().size())> >
 
template<typename T , typename C >
using HasData = std::is_convertible< phmap::decay_t< decltype(GetData(std::declval< C & >()))> *, T *const * >
 
template<typename C >
using ElementT = typename ElementType< C >::type
 
template<typename T >
using EnableIfMutable = typename std::enable_if<!std::is_const< T >::value, int >::type
 
template<typename From , typename To >
using EnableIfConvertibleToSpanConst = typename std::enable_if< IsConvertible< From, Span< const To > >::value >::type
 

函数

constexpr size_t Min (size_t a, size_t b) noexcept
 
template<typename C >
constexpr auto GetDataImpl (C &c, char) noexcept -> decltype(c.data())
 
char * GetDataImpl (std::string &s, int) noexcept
 
template<typename C >
constexpr auto GetData (C &c) noexcept -> decltype(GetDataImpl(c, 0))
 
template<typename T >
bool EqualImpl (Span< T > a, Span< T > b)
 
template<typename T >
bool LessThanImpl (Span< T > a, Span< T > b)
 

类型定义说明

◆ ElementT

template<typename C >
using phmap::span_internal::ElementT = typedef typename ElementType<C>::type

◆ EnableIfConvertibleToSpanConst

template<typename From , typename To >
using phmap::span_internal::EnableIfConvertibleToSpanConst = typedef typename std::enable_if<IsConvertible<From, Span<const To> >::value>::type

◆ EnableIfMutable

template<typename T >
using phmap::span_internal::EnableIfMutable = typedef typename std::enable_if<!std::is_const<T>::value, int>::type

◆ HasData

template<typename T , typename C >
using phmap::span_internal::HasData = typedef std::is_convertible<phmap::decay_t<decltype(GetData(std::declval<C&>()))>*, T* const*>

◆ HasSize

template<typename C >
using phmap::span_internal::HasSize = typedef std::is_integral<phmap::decay_t<decltype(std::declval<C&>().size())> >

函数说明

◆ EqualImpl()

template<typename T >
bool phmap::span_internal::EqualImpl ( Span< T >  a,
Span< T >  b 
)

◆ GetData()

template<typename C >
constexpr auto phmap::span_internal::GetData ( C &  c) -> decltype(GetDataImpl(c, 0))
constexprnoexcept

◆ GetDataImpl() [1/2]

template<typename C >
constexpr auto phmap::span_internal::GetDataImpl ( C &  c,
char   
) -> decltype(c.data())
constexprnoexcept

◆ GetDataImpl() [2/2]

char * phmap::span_internal::GetDataImpl ( std::string &  s,
int   
)
inlinenoexcept

◆ LessThanImpl()

template<typename T >
bool phmap::span_internal::LessThanImpl ( Span< T >  a,
Span< T >  b 
)

◆ Min()

constexpr size_t phmap::span_internal::Min ( size_t  a,
size_t  b 
)
constexprnoexcept