Console Library 4.7.0
A header-only library that makes C++ simple
Loading...
Searching...
No Matches
console::TiedIterators< It1, It2 > Class Template Reference

绑定迭代器对,一齐迭代。 More...

#include <iter.h>

Public Types

typedef std::pair< typename It1::value_type, typename It2::value_type > value_type
 类型别名
typedef void pointer
 类型别名(不实际使用)
typedef std::pair< typename It1::reference, typename It2::reference > reference
 类型别名
typedef std::forward_iterator_tag iterator_category
 类型别名
typedef std::ptrdiff_t difference_type
 类型别名

Public Member Functions

 TiedIterators (It1 i1, It2 i2)
 接受迭代器组的构造函数。
TiedIteratorsoperator++ ()
 将两个迭代器均前进一步。
reference operator* () const
 对迭代器组解引用。
bool operator== (const TiedIterators &other) const
 比较是否与另一迭代器相等。
bool operator!= (const TiedIterators &other) const
 比较是否与另一迭代器不等。

Detailed Description

template<class It1, class It2>
class console::TiedIterators< It1, It2 >

绑定迭代器对,一齐迭代。

Template Parameters
It1迭代器类型。
It2另一个迭代器类型。

Member Typedef Documentation

◆ difference_type

template<class It1, class It2>
typedef std::ptrdiff_t console::TiedIterators< It1, It2 >::difference_type

类型别名

◆ iterator_category

template<class It1, class It2>
typedef std::forward_iterator_tag console::TiedIterators< It1, It2 >::iterator_category

类型别名

◆ pointer

template<class It1, class It2>
typedef void console::TiedIterators< It1, It2 >::pointer

类型别名(不实际使用)

◆ reference

template<class It1, class It2>
typedef std::pair<typename It1::reference, typename It2::reference> console::TiedIterators< It1, It2 >::reference

类型别名

◆ value_type

template<class It1, class It2>
typedef std::pair<typename It1::value_type, typename It2::value_type> console::TiedIterators< It1, It2 >::value_type

类型别名

Constructor & Destructor Documentation

◆ TiedIterators()

template<class It1, class It2>
console::TiedIterators< It1, It2 >::TiedIterators ( It1 i1,
It2 i2 )
inline

接受迭代器组的构造函数。

Parameters
beg迭代器A。
end迭代器B。

Member Function Documentation

◆ operator!=()

template<class It1, class It2>
bool console::TiedIterators< It1, It2 >::operator!= ( const TiedIterators< It1, It2 > & other) const
inline

比较是否与另一迭代器不等。

所有迭代器不等才视作不等。

Note
为了实现在较短的序列结束时结束。
Warning
可能不是传统语义。
Returns
bool 相等如果 false 否则 true

◆ operator*()

template<class It1, class It2>
reference console::TiedIterators< It1, It2 >::operator* ( ) const
inline

对迭代器组解引用。

Returns
reference 返回由两个迭代器解引用得到的对。

◆ operator++()

template<class It1, class It2>
TiedIterators & console::TiedIterators< It1, It2 >::operator++ ( )
inline

将两个迭代器均前进一步。

Returns
TiedIterators & 返回 *this。

◆ operator==()

template<class It1, class It2>
bool console::TiedIterators< It1, It2 >::operator== ( const TiedIterators< It1, It2 > & other) const
inline

比较是否与另一迭代器相等。

任一迭代器相同即视作相等。

Note
为了实现在较短的序列结束时结束。
Warning
可能不是传统语义。
Returns
bool 相等如果 true 否则 false

The documentation for this class was generated from the following file: