根据SGI官方文档,仿函数也叫函数对象(Function Object, or Functor),定义就是任何可以像函数一样被调用的对象。一个普通的函数是函数对象,一个函数指针当然也是,广义上说任何定义了operator()的类对象都可以看作是函数对象。
仿函数(Functor、Function Object)
传递给STL算法的函数型参数(functional arguement)不一定要是...
分类:
编程语言 时间:
2014-04-30 22:28:38
阅读次数:
243
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
...
分类:
其他好文 时间:
2014-04-29 13:28:21
阅读次数:
398
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its documentation for any purpose is hereby granted without fee,
...
分类:
其他好文 时间:
2014-04-29 13:13:21
阅读次数:
309