C++ for_each解析
- 源码解析
源码解析
template<typename InputIterator, typename Function>
Function for_each(InputIterator beg, InputIterator end, Function f) {while(beg != end) f(*beg++);
}
template<typename InputIterator, typename Function>
Function for_each(InputIterator beg, InputIterator end, Function f) {while(beg != end) f(*beg++);
}