std::for_each working on more than one range of iterators

前端 未结 3 398
心在旅途
心在旅途 2020-12-17 18:31

The lambda notation has made stl algorithms more accessible. I am still learning to decide when it\'s useful and when to fall back to good old fashioned for-loops. Often, it

3条回答
  •  北海茫月
    2020-12-17 18:57

    std::transform has an overload that operates on two sequences in parallel. You'd need a null output iterator to absorb the results though, if you weren't interested in collecting any.

提交回复
热议问题