[STL]std::for_each
2012-09-04 10:39
267 查看
// for_each. Apply a function to every element of a range. template <class _InputIter, class _Function> _Function for_each(_InputIter __first, _InputIter __last, _Function __f) { __STL_REQUIRES(_InputIter, _InputIterator); for ( ; __first != __last; ++__first) __f(*__first); return __f; }
__f(T); 定义function类型的时候,是 operator()(class T)?
那么 boost::bind 返回的类型也必须是 []()(class T)?
相关文章推荐
- 【C++ STL应用与实现】26: 如何使用std::for_each以及基于范围的for循环 (since C++11)
- (STL)for_each、find_if用法
- std::for_each
- STL 实践(for_each() getline sort random_shuffle的使用)
- STL (1)for_each 函数
- STL--for_each()
- c++ STL之 for_each(权哥)
- c++11,for,for each,std::for_each的应用
- STL之sort和for_each的用法
- std::for_each()的奇怪现象
- STL中的两个算法for_each与transform
- 遇到 'for_each' is not a member of 'std' 的问题
- std::for_each
- std 中for_each 算法与c++11范围for语句
- C++ STL 中有关于for_each() 和 transform() 算法
- 利用std::for_each 定义宏函数
- STL_算法_for_each
- STL算法find,find_if,find_if_not,sort,fill,for_each,count,adjacent_find,random_shuffle,prev_permutation
- STL之for_each, cout, cout_if, find, find_if
- STL: for_each