NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
类型推导辅助工具

类型推导辅助工具类 更多...

类型推导辅助工具 的协作图:

struct  integral_constant< T, Value >
 整数常量包装器 更多...
struct  enable_if< Test, T >
 条件启用模板 更多...
struct  conditional< Test, T1, T2 >
 条件选择类型 更多...
struct  negation< T >
 逻辑非包装器 更多...
struct  is_same< T1, T2 >
 判断两个类型是否相同 更多...
struct  type_identity< T >
 类型标识包装器 更多...
struct  is_any_of< T, Types >
 判断类型是否在类型集合中 更多...
struct  disjunction< Args >
 类型集合的逻辑或操作 更多...
struct  conjunction< Args >
 类型集合的逻辑与操作 更多...

类型定义

template<bool Value>
using bool_constant = integral_constant<bool, Value>
 布尔常量包装器
using true_type = bool_constant<true>
 表示true的类型
using false_type = bool_constant<false>
 表示false的类型
template<uint32_t Value>
using uint32_constant = integral_constant<uint32_t, Value>
 32位无符号整数常量包装器
template<uint64_t Value>
using uint64_constant = integral_constant<uint64_t, Value>
 64位无符号整数常量包装器
template<typename... Types>
using void_t = void
 将任意类型映射为void
template<bool Test, typename T = void>
using enable_if_t = typename enable_if<Test, T>::type
 enable_if的便捷别名
template<bool Test, typename T1, typename T2>
using conditional_t = typename conditional<Test, T1, T2>::type
 conditional的便捷别名
template<typename T>
using type_identity_t = typename type_identity<T>::type
 type_identity的便捷别名

变量

template<typename T>
NEFORCE_INLINE17 constexpr bool negation_v = negation<T>::value
 negation的便捷变量模板
template<typename T1, typename T2>
NEFORCE_INLINE17 constexpr bool is_same_v = is_same<T1, T2>::value
 is_same的便捷变量模板
template<typename T, typename... Types>
NEFORCE_INLINE17 constexpr bool is_any_of_v = is_any_of<T, Types...>::value
 is_any_of的便捷变量模板
template<typename... Args>
NEFORCE_INLINE17 constexpr bool disjunction_v = disjunction<Args...>::value
 disjunction的便捷变量模板
template<typename... Args>
NEFORCE_INLINE17 constexpr bool conjunction_v = conjunction<Args...>::value
 conjunction的便捷变量模板

详细描述

类型推导辅助工具类

类型定义说明

◆ bool_constant

template<bool Value>
using bool_constant = integral_constant<bool, Value>

布尔常量包装器

模板参数
Value布尔值

在文件 type_traits.hpp62 行定义.

◆ uint32_constant

template<uint32_t Value>
using uint32_constant = integral_constant<uint32_t, Value>

32位无符号整数常量包装器

模板参数
Value32位无符号整数值

在文件 type_traits.hpp73 行定义.

◆ uint64_constant

template<uint64_t Value>
using uint64_constant = integral_constant<uint64_t, Value>

64位无符号整数常量包装器

模板参数
Value64位无符号整数值

在文件 type_traits.hpp81 行定义.

◆ void_t

template<typename... Types>
using void_t = void

将任意类型映射为void

模板参数
Types任意类型序列

用于SFINAE技术中检测表达式是否合法。

在文件 type_traits.hpp92 行定义.