当前位置: 代码迷 >> 综合 >> C++ for_each
  详细解决方案

C++ for_each

热度:30   发布时间:2024-01-24 18:12:37.0

C++ for_each解析

  • 源码解析

源码解析

template<typename InputIterator, typename Function>
Function for_each(InputIterator beg, InputIterator end, Function f) {while(beg != end) f(*beg++);
}