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

元函数。 更多...

Metafunctions 的协作图:

struct  ystdex::make_parameter_tuple< typename >
 取参数列表元组。 更多...
 
struct  ystdex::return_of< typename >
 取返回类型。 更多...
 
struct  ystdex::parameter_of< _vIdx, _fCallable >
 取指定索引的参数类型。 更多...
 
struct  ystdex::paramlist_size< _fCallable >
 取参数列表大小。 更多...
 
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 >
 数组及数组引用类型退化。 更多...
 

类型定义

template<typename _tParam , typename = std::pair< decltype(*std::declval<_tParam&>()), decltype(++std::declval<_tParam&>())>>
using ystdex::enable_for_iterator_t = enable_if_t< is_same< decltype(++std::declval< _tParam & >()), _tParam & >::value, int >
 选择迭代器类型的特定重载避免和其它类型冲突。 更多...
 
template<typename _tParam , typename = decltype(std::declval<_tParam>()[0])>
using ystdex::enable_for_string_class_t = enable_if_t< is_class< decay_t< _tParam >>::value, int >
 选择字符串类类型的特定重载避免和其它非字符串类型冲突。 更多...
 
template<size_t _vIdx, typename _type >
using ystdex::tuple_element_t = typename std::tuple_element< _vIdx, _type >::type
 
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 >
 移除选择类类型的特定重载避免构造模板和复制/转移构造函数冲突。 更多...
 
template<typename _type >
using ystdex::classify_value_t = conditional_t< std::is_class< _type >::value, _type, boxed_value< _type >>
 包装非类类型为类类型。 更多...
 
template<typename... _types>
using ystdex::wrap_mixin_t = typename details::wrap_mixin_helper< make_natural_sequence_t< sizeof...(_types)>, std::tuple< _types...>>::type
 包装为混入类。 更多...
 
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
 

详细描述

元函数。

参见
http://www.boost.org/doc/libs/1_50_0/libs/mpl/doc/refmanual/metafunction.html
自从
build 333

类型定义说明

template<typename _type >
using ystdex::add_const_t = typedef typename add_const<_type>::type

在文件 type_op.hpp225 行定义.

template<typename _type >
using ystdex::add_cv_t = typedef typename add_cv<_type>::type

在文件 type_op.hpp231 行定义.

template<typename _type >
using ystdex::add_lvalue_reference_t = typedef typename add_lvalue_reference<_type>::type

在文件 type_op.hpp237 行定义.

template<typename _type >
using ystdex::add_pointer_t = typedef typename add_pointer<_type>::type

在文件 type_op.hpp258 行定义.

template<typename _type >
using ystdex::add_rvalue_reference_t = typedef typename add_rvalue_reference<_type>::type

在文件 type_op.hpp240 行定义.

template<typename _type >
using ystdex::add_volatile_t = typedef typename add_volatile<_type>::type

在文件 type_op.hpp228 行定义.

template<size_t _vLen, size_t _vAlign = std::alignment_of< typename aligned_storage<_vLen>::type >::value>
using ystdex::aligned_storage_t = typedef typename aligned_storage<_vLen, _vAlign>::type

在文件 type_op.hpp262 行定义.

template<typename _type >
using ystdex::classify_value_t = typedef conditional_t<std::is_class<_type>::value, _type, boxed_value<_type>>

包装非类类型为类类型。

自从
build 477

在文件 utility.hpp244 行定义.

template<typename... _types>
using ystdex::common_type_t = typedef typename common_type<_types...>::type

在文件 type_op.hpp280 行定义.

template<bool _bCond, typename _type , typename _type2 >
using ystdex::conditional_t = typedef typename conditional<_bCond, _type, _type2>::type

在文件 type_op.hpp277 行定义.

template<typename _type >
using ystdex::decay_t = typedef typename decay<_type>::type
自从
build 339

在文件 type_op.hpp271 行定义.

template<typename _tParam , typename = std::pair< decltype(*std::declval<_tParam&>()), decltype(++std::declval<_tParam&>())>>
using ystdex::enable_for_iterator_t = typedef enable_if_t< is_same<decltype(++std::declval<_tParam&>()), _tParam&>::value, int>

选择迭代器类型的特定重载避免和其它类型冲突。

参见
enable_if_t
自从
build 483

在文件 iterator.hpp60 行定义.

template<typename _tParam , typename = decltype(std::declval<_tParam>()[0])>
using ystdex::enable_for_string_class_t = typedef enable_if_t<is_class<decay_t<_tParam>>::value, int>

选择字符串类类型的特定重载避免和其它非字符串类型冲突。

参见
enable_if_t
自从
build 483

在文件 string.hpp67 行定义.

template<bool _bCond, typename _type = void>
using ystdex::enable_if_t = typedef typename enable_if<_bCond, _type>::type

在文件 type_op.hpp274 行定义.

template<class _tClass , typename _tParam , typename _type = int>
using ystdex::exclude_self_ctor_t = typedef enable_if_t<!is_same<_tClass&, remove_rcv_t<_tParam>&>::value, _type>

移除选择类类型的特定重载避免构造模板和复制/转移构造函数冲突。

参见
enable_if_t
自从
build 448

在文件 type_op.hpp766 行定义.

template<typename _type >
using ystdex::make_signed_t = typedef typename make_signed<_type>::type

在文件 type_op.hpp243 行定义.

template<typename _type >
using ystdex::make_unsigned_t = typedef typename make_unsigned<_type>::type

在文件 type_op.hpp246 行定义.

template<typename _type >
using ystdex::remove_all_extents_t = typedef typename remove_all_extents<_type>::type

在文件 type_op.hpp252 行定义.

template<typename _type >
using ystdex::remove_cv_t = typedef typename remove_cv<_type>::type

在文件 type_op.hpp222 行定义.

template<typename _type >
using ystdex::remove_extent_t = typedef typename remove_extent<_type>::type

在文件 type_op.hpp249 行定义.

template<typename _type >
using ystdex::remove_pointer_t = typedef typename remove_pointer<_type>::type

在文件 type_op.hpp255 行定义.

template<typename _type >
using ystdex::remove_reference_t = typedef typename remove_reference<_type>::type

在文件 type_op.hpp234 行定义.

template<typename _type >
using ystdex::remove_volatile_t = typedef typename remove_volatile<_type>::type

在文件 type_op.hpp219 行定义.

template<typename _type >
using ystdex::result_of_t = typedef typename result_of<_type>::type

在文件 type_op.hpp286 行定义.

template<size_t _vIdx, typename _type >
using ystdex::tuple_element_t = typedef typename std::tuple_element<_vIdx, _type>::type
自从
build 477

在文件 tuple.hpp44 行定义.

template<typename _type >
using ystdex::underlying_type_t = typedef typename underlying_type<_type>::type

在文件 type_op.hpp283 行定义.

template<typename... _types>
using ystdex::wrap_mixin_t = typedef typename details::wrap_mixin_helper< make_natural_sequence_t<sizeof...(_types)>, std::tuple<_types...>>::type

包装为混入类。

注解
对于非类类型首先使用 classify_value_t 包装。

在文件 mixin.hpp142 行定义.