YSTest: ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference > 模板类 参考

YSTest PreAlpha_b900_20201012 The YSLib Test Project

Public 类型 | Public 成员函数 | Protected 类型 | Protected 成员函数 | 友元 | 所有成员列表
ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference > 模板类 参考
Iterators » Iterator Adaptors

动态泛型输入迭代器。 更多...

`#include <any_iterator.hpp>`

类 ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference > 继承关系图:
[图例]
ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference > 的协作图:
[图例]

## Public 类型

using | iterator_category = std::input_iterator_tag
using | value_type = _type
using | difference_type = _tDifference
using | pointer = _tPointer
using | reference = _tReference

## Public 成员函数

| any_input_iterator ()=default
template<typename _tIter , typename = exclude_self_t<any_input_iterator, _tIter>>
| any_input_iterator (_tIter &&i)
| 构造：使用现有迭代器。 更多...
| any_input_iterator (const any_input_iterator &)=default
| any_input_iterator (any_input_iterator &&)=default
any_input_iterator & | operator= (const any_input_iterator &)=default
any_input_iterator & | operator= (any_input_iterator &&)=default
reference | operator* () const
pointer | operator-> () const
any_input_iterator & | operator++ ()
any & | get ()
const any & | get () const
template<typename _type >
_type * | get_object_ptr ()
template<typename _type >
const _type * | get_object_ptr () const
template<typename _type >
_type * | try_get_object_ptr ()
template<typename _type >
const _type * | try_get_object_ptr () const
const type_info & | type () const

## Protected 类型

using | base = any
Protected 类型 继承自 ystdex::any
template<typename _type >
using | opt_in_place_t = details::any_in_place_t< _type >
| 判断使用分配器构造时是否忽略分配器而在原地存储。 更多...
template<class _tAlloc , typename _type >
using | allocated_value_handler_t = cond_t< any::opt_in_place_t< _type >, any_ops::value_handler< _type >, any_ops::allocator_value_handler_t< _tAlloc, _type > >
| 根据分配器类型和存储对象的类型取使用分配器构造时的处理器。 更多...
template<class _tAlloc , class _tHolder >
using | allocated_holder_handler_t = cond_t< any::opt_in_place_t< _tHolder >, any_ops::holder_handler< _tHolder >, any_ops::allocator_holder_handler_t< _tAlloc, _tHolder > >
| 根据分配器类型和存储对象的类型取使用分配器和持有者构造时的处理器。 更多...

## Protected 成员函数

template<typename _tIter , typename _tHandler >
| any_input_iterator (any_ops::with_handler_t< _tHandler > t, _tIter &&i)
Protected 成员函数 继承自 ystdex::any
| any ()=default
| any (default_init_t)
template<typename _type , typename = exclude_self_t<any, _type>, typename = exclude_tag_t<_type>>
| any (_type &&x)
template<typename _type , class _tAlloc , typename = exclude_self_t<any, _type>, typename = exclude_tag_t<_type>>
| any (std::allocator_arg_t, const _tAlloc &a, _type &&x)
template<typename _type , typename... _tParams, typename = enable_if_t<is_constructible<decay_t<_type>, _tParams...>::value>>
| any (in_place_type_t< _type >, _tParams &&... args)
template<typename _type , class _tAlloc , typename... _tParams, typename = enable_if_t<is_constructible<decay_t<_type>, _tParams...>::value>>
| any (std::allocator_arg_t, const _tAlloc &a, in_place_type_t< _type >, _tParams &&... args)
template<typename _type , typename _type2 , typename... _tParams, typename = enable_if_t<is_constructible<decay_t<_type>, std::initializer_list<_type2>&, _tParams...>::value>>
| any (in_place_type_t< _type >, std::initializer_list< _type2 > il, _tParams &&... args)
template<typename _type , typename _type2 , class _tAlloc , typename... _tParams, typename = enable_if_t<is_constructible<decay_t<_type>, std::initializer_list<_type2>&, _tParams...>::value>>
| any (std::allocator_arg_t, const _tAlloc &a, in_place_type_t< _type >, std::initializer_list< _type2 > il, _tParams &&... args)
template<typename _tHolder , typename = enable_with_handler_params_t< is_holder_arg_t<_tHolder>, any_ops::holder_handler, empty_base<_tHolder>, std::unique_ptr<_tHolder>>>
| any (any_ops::use_holder_t, std::unique_ptr< _tHolder > p)
| 构造：使用指定持有者。 更多...
template<typename _tHolder , typename = enable_with_handler_params_t< is_holder_arg_t<decay_t<_tHolder>>, any_ops::holder_handler, empty_base<decay_t<_tHolder>>, _tHolder>>
| any (any_ops::use_holder_t, _tHolder &&h)
template<typename _tHolder , class _tAlloc , typename = enable_with_handler_params_t< is_holder_arg_t<decay_t<_tHolder>>, any_ops::allocator_holder_handler_t, empty_base<_tAlloc, decay_t<_tHolder>>, const _tAlloc&, _tHolder>>
| any (std::allocator_arg_t, const _tAlloc &a, any_ops::use_holder_t, _tHolder &&h)
template<typename _tHolder , typename... _tParams, typename = enable_with_handler_params_t<is_holder_arg_t<_tHolder>, any_ops::holder_handler, empty_base<_tHolder>, _tParams...>>
| any (any_ops::use_holder_t, in_place_type_t< _tHolder >, _tParams &&... args)
template<typename _tHolder , class _tAlloc , typename... _tParams, typename = enable_with_handler_params_t<is_holder_arg_t<_tHolder>, any_ops::allocator_holder_handler_t, empty_base<_tAlloc, _tHolder>, const _tAlloc&, _tParams...>>
| any (std::allocator_arg_t, const _tAlloc &a, any_ops::use_holder_t, in_place_type_t< _tHolder >, _tParams &&... args)
template<typename _type , typename = exclude_tag_t<_type>, typename = enable_with_handler_t< any_ops::holder_handler<any_ops::value_holder<decay_t<_type>>>, _type>>
| any (_type &&x, any_ops::use_holder_t)
template<class _tAlloc , typename _type , typename = exclude_tag_t<_type>, typename = exclude_tag_t<_tAlloc>, typename = enable_with_handler_t<any_ops::allocator_holder_handler_t<_tAlloc, any_ops::value_holder<decay_t<_type>>>, const _tAlloc&, _type>>
| any (std::allocator_arg_t, const _tAlloc &a, _type &&x, any_ops::use_holder_t)
template<class _tHandler , typename... _tParams, typename = enable_with_handler_t<_tHandler, _tParams...>>
| any (any_ops::with_handler_t< _tHandler > t, _tParams &&... args)
template<class _tHandler , class _tAlloc , typename... _tParams, typename = enable_with_handler_t<_tHandler, const _tAlloc&, _tParams...>>
| any (std::allocator_arg_t, const _tAlloc &a, any_ops::with_handler_t< _tHandler > t, _tParams &&... args)
| any (const any &x)
template<class _tAlloc >
| any (std::allocator_arg_t, const _tAlloc &a, const any &x)
| any (any &&x)
template<class _tAlloc >
| any (std::allocator_arg_t, const _tAlloc &a, any &&x)
| ~any ()
template<typename _type , typename = exclude_self_t<any, _type>, typename = exclude_tag_t<_type>>
any & | operator= (_type &&x)
any & | operator= (const any &a)
| 复制赋值：使用复制和交换。 更多...
any & | operator= (any &&a)
| 转移赋值。 更多...
void * | get () const
any_ops::holder * | get_holder () const
template<typename _type >
_type * | get_object_ptr ()
| 取目标指针。 更多...
template<typename _type >
const _type * | get_object_ptr () const
void | reset ()
void | swap (any &a)
| 交换对象。 更多...
template<typename _type >
_type * | try_get_object_ptr ()
| 尝试取目标指针：存储目标类型和模板参数相同且不存在持有者抛出的异常。 更多...
template<typename _type >
const _type * | try_get_object_ptr () const
const type_info & | type () const
void * | unchecked_get () const
| 取包含对象的指针。 更多...
any_ops::holder * | unchecked_get_holder () const
| 取持有者指针。 更多...
const type_info & | unchecked_type () const
| 取包含对象的类型。 更多...

## 友元

bool | operator== (const any_input_iterator &x, const any_input_iterator &y)
bool | is_undereferenceable (const any_input_iterator &i)

## 额外继承的成员函数

相关函数 继承自 ystdex::any
template<typename _type , typename... _tParams>
any | make_any (_tParams &&... args)
| 创建 any 对象。 更多...

## 详细描述

### template<typename _type, typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>
class ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >

动态泛型输入迭代器。

自从
  build 400

警告
  非虚析构。

在文件 any_iterator.hpp 第 244 行定义.

## 成员类型定义说明

## ◆ base

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::base = any

protected

自从
  build 686

在文件 any_iterator.hpp 第 250 行定义.

## ◆ difference_type

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::difference_type = _tDifference

在文件 any_iterator.hpp 第 257 行定义.

## ◆ iterator_category

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::iterator_category = std::input_iterator_tag

自从
  build 676

在文件 any_iterator.hpp 第 255 行定义.

## ◆ pointer

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::pointer = _tPointer

在文件 any_iterator.hpp 第 259 行定义.

## ◆ reference

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::reference = _tReference

在文件 any_iterator.hpp 第 260 行定义.

## ◆ value_type

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

using ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::value_type = _type

在文件 any_iterator.hpp 第 256 行定义.

## 构造及析构函数说明

## ◆ any_input_iterator() [1/5]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::any_input_iterator | ( |  | ) |

default

自从
  build 357

## ◆ any_input_iterator() [2/5]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>
template<typename _tIter , typename = exclude_self_t<any_input_iterator, _tIter>>

ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::any_input_iterator | ( | _tIter && | i | ) |

inline

构造：使用现有迭代器。

自从
  build 675

在文件 any_iterator.hpp 第 270 行定义.

## ◆ any_input_iterator() [3/5]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>
template<typename _tIter , typename _tHandler >

ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::any_input_iterator | ( | any_ops::with_handler_t< _tHandler > | t,
|  | _tIter && | i
| ) |  |

inlineprotected

自从
  build 686

在文件 any_iterator.hpp 第 279 行定义.

## ◆ any_input_iterator() [4/5]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::any_input_iterator | ( | const any_input_iterator< _type, _tDifference, _tPointer, _tReference > & |  | ) |

default

自从
  build 356

## ◆ any_input_iterator() [5/5]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::any_input_iterator | ( | any_input_iterator< _type, _tDifference, _tPointer, _tReference > && |  | ) |

default

自从
  build 356

## 成员函数说明

## ◆ get() [1/2]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

any& ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::get | ( |  | ) |

inline

自从
  build 615

在文件 any_iterator.hpp 第 342 行定义.

## ◆ get() [2/2]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

const any& ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::get | ( |  | ) | const

inline

在文件 any_iterator.hpp 第 347 行定义.

## ◆ get_object_ptr() [1/2]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>
template<typename _type >

_type* ystdex::any::get_object_ptr | ( | typename _type |  | ) |

inline

自从
  build 854

在文件 any.h 第 2065 行定义.

## ◆ get_object_ptr() [2/2]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>
template<typename _type >

const _type* ystdex::any::get_object_ptr | ( | typename _type |  | ) |

inline

自从
  build 854

在文件 any.h 第 2071 行定义.

## ◆ operator*()

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

reference ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::operator* | ( |  | ) | const

inline

在文件 any_iterator.hpp 第 301 行定义.

## ◆ operator++()

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

any_input_iterator& ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::operator++ | ( |  | ) |

inline

在文件 any_iterator.hpp 第 320 行定义.

被这些函数引用 ystdex::any_forward_iterator< _type, ptrdiff_t, _type *, _type & >::operator++().

这是这个函数的调用关系图:

## ◆ operator->()

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

pointer ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::operator-> | ( |  | ) | const

inline

在文件 any_iterator.hpp 第 314 行定义.

## ◆ operator=() [1/2]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

any_input_iterator& ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::operator= | ( | any_input_iterator< _type, _tDifference, _tPointer, _tReference > && |  | ) |

default

## ◆ operator=() [2/2]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

any_input_iterator& ystdex::any_input_iterator< _type, _tDifference, _tPointer, _tReference >::operator= | ( | const any_input_iterator< _type, _tDifference, _tPointer, _tReference > & |  | ) |

default

自从
  build 454

## ◆ try_get_object_ptr() [1/2]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>
template<typename _type >

_type* ystdex::any::try_get_object_ptr | ( | typename _type |  | ) |

inline

自从
  build 854

在文件 any.h 第 2135 行定义.

## ◆ try_get_object_ptr() [2/2]

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>
template<typename _type >

const _type* ystdex::any::try_get_object_ptr | ( | typename _type |  | ) |

inline

自从
  build 854

在文件 any.h 第 2142 行定义.

## ◆ type()

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

const type_info& ystdex::any::type

inline

自从
  build 355

在文件 any.h 第 2151 行定义.

## 友元及相关函数文档

## ◆ operator==

template<typename _type , typename _tDifference = ptrdiff_t, typename _tPointer = _type*, typename _tReference = _type&>

bool operator== | ( | const any_input_iterator< _type, _tDifference, _tPointer, _tReference > & | x,
|  | const any_input_iterator< _type, _tDifference, _tPointer, _tReference > & | y
| ) |  |

friend

自从
  build 676

在文件 any_iterator.hpp 第 328 行定义.

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

- any_iterator.hpp