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

区间谓词(闭区间)。 More...

#include <gextra.h>

Public Member Functions

bool operator() (const T &x) const
 判断输入值是否在闭区间 [low, high] 内。

Public Attributes

T low
T high

Detailed Description

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

区间谓词(闭区间)。

Template Parameters
T元素类型。

Member Function Documentation

◆ operator()()

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

判断输入值是否在闭区间 [low, high] 内。

Parameters
x输入值。
Returns
low <= x && x <= high。

Member Data Documentation

◆ high

template<class T>
T console::ops::Between< T >::high

◆ low

template<class T>
T console::ops::Between< T >::low

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