I was searching on the best way to lcase/ucase a C++ STL class and I came across this post:
One of the solutions given was:
#include <algorithm>
#include <string> 
std::string data = “Abc”; 
std::transform(data.begin(), data.end(), data.begin(), ::tolower);
However, transform is defined in stl_algo.h as:
  template<typename _InputIterator, typename _OutputIterator,
       typename _UnaryOperation>
    _OutputIterator
    transform(_InputIterator __first, _InputIterator __last,
          _OutputIterator __result, _UnaryOperation __unary_op)
    {
...
So how come it is being called without providing the template instantiation parameters?
To clarify my question, I was expecting the transform function to be called like:
transform(std::string::iterator, std::string::iterator, 
          /* not sure what to put here for the predicate */);
Is this a one off (a special case), or am I missing something fundamental?
 
     
     
    