YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
type_op.hpp 文件参考

C++ 类型操作。 更多...

#include "../ydef.h"
type_op.hpp 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

struct  ystdex::is_returnable< _type >
 判断指定类型是否可作为返回值类型。 更多...
 
struct  ystdex::is_decayable< _type >
 判断是否可被退化。 更多...
 
struct  ystdex::is_class_pointer< _type >
 判断指定类型是否是指向类类型对象的指针。 更多...
 
struct  ystdex::is_lvalue_class_reference< _type >
 判断指定类型是否是左值类类型引用。 更多...
 
struct  ystdex::is_rvalue_class_reference< _type >
 判断指定类型是否是右值类类型引用。 更多...
 
struct  ystdex::is_pod_struct< _type >
 判断指定类型是否是 POD struct 。 更多...
 
struct  ystdex::is_pod_union< _type >
 判断指定类型是否是 POD union 。 更多...
 
struct  ystdex::is_covariant< _tFrom, _tTo >
 判断指定类型之间是否协变。 更多...
 
struct  ystdex::is_contravariant< _tFrom, _tTo >
 判断指定类型之间是否逆变。 更多...
 
struct  ystdex::details::has_mem_value< _type >
 
struct  ystdex::details::have_equality_operator< _type1, _type2 >
 
struct  ystdex::details::has_subscription< _type1, _type2 >
 
struct  ystdex::details::have_nonempty_virtual_base< _type >
 
struct  ystdex::details::have_nonempty_virtual_base< _type >::A
 
struct  ystdex::details::have_nonempty_virtual_base< _type >::B
 
struct  ystdex::details::have_nonempty_virtual_base< _type >::C
 
struct  ystdex::details::have_common_nonempty_virtual_base< _type1, _type2 >
 
struct  ystdex::details::have_common_nonempty_virtual_base< _type1, _type2 >::A
 
struct  ystdex::details::have_common_nonempty_virtual_base< _type1, _type2 >::B
 
struct  ystdex::details::have_common_nonempty_virtual_base< _type1, _type2 >::C
 
struct  ystdex::has_mem_value< _type >
 判断 _type 是否包含 value 成员。 更多...
 
struct  ystdex::has_subscription< _type1, _type2 >
 判断是否存在合式的结果为非 void 类型的 [] 操作符接受指定类型的表达式。 更多...
 
struct  ystdex::has_equality_operator< _type1, _type2 >
 判断是否存在合式的结果可转换为 bool 类型的 == 操作符接受指定类型的表达式。 更多...
 
struct  ystdex::has_nonempty_virtual_base< _type >
 判断指定类型是否有非空虚基类。 更多...
 
struct  ystdex::has_common_nonempty_virtual_base< _type1, _type2 >
 判断指定的两个类类型是否有非空虚基类。 更多...
 
struct  ystdex::identity< _type >
 恒等元函数。 更多...
 
struct  ystdex::remove_rcv< _type >
 移除可能被 cv-qualifier 修饰的引用类型。 更多...
 
struct  ystdex::remove_rp< _type >
 移除指针和引用类型。 更多...
 
struct  ystdex::remove_rpcv< _type >
 移除可能被 cv-qualifier 修饰的引用和指针类型。 更多...
 
struct  ystdex::array_decay< _type >
 数组类型退化。 更多...
 
struct  ystdex::qualified_decay< _type >
 保持修饰符的类型退化。 更多...
 
struct  ystdex::array_ref_decay< _type >
 数组及数组引用类型退化。 更多...
 
struct  ystdex::array_ref_decay< _type & >
 
struct  ystdex::array_ref_decay< _type && >
 
struct  ystdex::n_tag< _vN >
 自然数标记。 更多...
 
struct  ystdex::n_tag< 0 >
 

命名空间

 ystdex
 
 ystdex::details
 

宏定义

#define YB_HAS_MEMBER(_n)
 测试包含指定名称的嵌套成员。 更多...
 
#define YB_TYPE_OP_TEST_2(_n, _expr)
 测试包含指定的 2 个类型的表达式是否合式。 更多...
 

类型定义

template<typename _type >
using ystdex::remove_const_t = typename remove_const< _type >::type
 ISO C++ 1y 兼容类型操作别名。 更多...
 
template<typename _type >
using ystdex::remove_volatile_t = typename remove_volatile< _type >::type
 
template<typename _type >
using ystdex::remove_cv_t = typename remove_cv< _type >::type
 
template<typename _type >
using ystdex::add_const_t = typename add_const< _type >::type
 
template<typename _type >
using ystdex::add_volatile_t = typename add_volatile< _type >::type
 
template<typename _type >
using ystdex::add_cv_t = typename add_cv< _type >::type
 
template<typename _type >
using ystdex::remove_reference_t = typename remove_reference< _type >::type
 
template<typename _type >
using ystdex::add_lvalue_reference_t = typename add_lvalue_reference< _type >::type
 
template<typename _type >
using ystdex::add_rvalue_reference_t = typename add_rvalue_reference< _type >::type
 
template<typename _type >
using ystdex::make_signed_t = typename make_signed< _type >::type
 
template<typename _type >
using ystdex::make_unsigned_t = typename make_unsigned< _type >::type
 
template<typename _type >
using ystdex::remove_extent_t = typename remove_extent< _type >::type
 
template<typename _type >
using ystdex::remove_all_extents_t = typename remove_all_extents< _type >::type
 
template<typename _type >
using ystdex::remove_pointer_t = typename remove_pointer< _type >::type
 
template<typename _type >
using ystdex::add_pointer_t = typename add_pointer< _type >::type
 
template<size_t _vLen, size_t _vAlign = std::alignment_of< typename aligned_storage<_vLen>::type >::value>
using ystdex::aligned_storage_t = typename aligned_storage< _vLen, _vAlign >::type
 
template<class _tClass , typename _tParam , typename _type = int>
using ystdex::exclude_self_ctor_t = enable_if_t<!is_same< _tClass &, remove_rcv_t< _tParam > & >::value, _type >
 移除选择类类型的特定重载避免构造模板和复制/转移构造函数冲突。 更多...
 
using ystdex::first_tag = n_tag< 0 >
 第一分量标记。 更多...
 
using ystdex::second_tag = n_tag< 1 >
 第二分量标记。 更多...
 
template<typename _type >
using ystdex::decay_t = typename decay< _type >::type
 
template<bool _bCond, typename _type = void>
using ystdex::enable_if_t = typename enable_if< _bCond, _type >::type
 
template<bool _bCond, typename _type , typename _type2 >
using ystdex::conditional_t = typename conditional< _bCond, _type, _type2 >::type
 
template<typename... _types>
using ystdex::common_type_t = typename common_type< _types...>::type
 
template<typename _type >
using ystdex::underlying_type_t = typename underlying_type< _type >::type
 
template<typename _type >
using ystdex::result_of_t = typename result_of< _type >::type
 
template<typename _type >
using ystdex::remove_rcv_t = typename remove_rcv< _type >::type
 

详细描述

C++ 类型操作。

版本
r1199
作者
FrankHB frank.nosp@m.hb19.nosp@m.89@gm.nosp@m.ail..nosp@m.com
自从
build 201
创建时间:
2011-04-14 08:54:25 +0800
修改时间:
2014-02-08 12:04 +0800
文本编码:
UTF-8
模块名称:
YStandardEx::TypeOperation

在文件 type_op.hpp 中定义.

宏定义说明

#define YB_HAS_MEMBER (   _n)
值:
template<class _type> \
struct has_mem_##_n \
{ \
private: \
template<typename _type2> \
static std::true_type \
template<typename _type2> \
static std::false_type \
test(...); \
\
public: \
static yconstexpr bool value = decltype(test<_type>(nullptr))::value; \
};
#define yconstexpr
指定编译时常量表达式。
Definition: ydef.h:462
空基类模板。
Definition: ydef.h:658

测试包含指定名称的嵌套成员。

警告
当参数包含前置下划线时可能和保留名称冲突。
自从
build 440

在文件 type_op.hpp416 行定义.

#define YB_TYPE_OP_TEST_2 (   _n,
  _expr 
)
值:
template<typename _type1, typename _type2> \
struct _n \
{ \
private: \
template<typename _type> \
static std::true_type \
test(ystdex::enable_if_t<(_expr), int>); \
template<typename> \
static std::false_type \
test(...); \
\
public: \
static yconstexpr bool value = decltype(test<_type1>(0))::value; \
};
#define yconstexpr
指定编译时常量表达式。
Definition: ydef.h:462
typename enable_if< _bCond, _type >::type enable_if_t
Definition: type_op.hpp:274

测试包含指定的 2 个类型的表达式是否合式。

自从
build 399

在文件 type_op.hpp448 行定义.