STL: transform

transform

Applies a specified function object to each element in a source range or to a pair of elements from two source ranges and copies the return values of the function object into a destination range.

template<class InputIterator, class OutputIterator, class UnaryFunction> 
   OutputIterator transform( 
      InputIterator _First1,  
      InputIterator _Last1,  
      OutputIterator _Result, 
      UnaryFunction _Func 
   ); 
template<class InputIterator1, class InputIterator2, class OutputIterator, 
   class BinaryFunction> 
   OutputIterator transform( 
      InputIterator1 _First1,  
      InputIterator1 _Last1, 
      InputIterator2 _First2,  
      OutputIterator _Result, 
      BinaryFunction _Func 
   );
原文地址:https://www.cnblogs.com/freewater/p/2953659.html