function_object.h
来自「This rar contains code from every chapte」· C头文件 代码 · 共 14 行
H
14 行
// function_object.h
// Unary predicate to identify negative values
#pragma once
#include <functional>
template <class T> class is_negative: public std::unary_function<T, bool>
{
public:
result_type operator()(T& value)
{
return value<0;
}
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?