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

整除谓词。 More...

#include <gextra.h>

Public Member Functions

bool operator() (const T &x) const
 判断输入值是否能被 n 整除。

Public Attributes

T n

Detailed Description

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

整除谓词。

Template Parameters
T元素类型。

Member Function Documentation

◆ operator()()

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

判断输入值是否能被 n 整除。

Parameters
x输入值。
Returns
x % n == 0。

Member Data Documentation

◆ n

template<class T>
T console::ops::DivisibleBy< T >::n

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