Console Library 8.0.0
A header-only library that makes C++ simple
Loading...
Searching...
No Matches
console::ops::unique< T > Struct Template Reference

相邻去重过滤器。 More...

#include <gen.h>

Public Member Functions

bool operator() (const T &x)
 判断当前元素是否与前一个元素不同。

Public Attributes

bool first = true
T last

Detailed Description

template<class T>
struct console::ops::unique< T >

相邻去重过滤器。

Template Parameters
T元素类型。

Member Function Documentation

◆ operator()()

template<class T>
bool console::ops::unique< T >::operator() ( const T & x)
inline

判断当前元素是否与前一个元素不同。

Parameters
x当前元素。
Returns
是否保留该元素。

Member Data Documentation

◆ first

template<class T>
bool console::ops::unique< T >::first = true

◆ last

template<class T>
T console::ops::unique< T >::last

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