Are you sure that the code will not be compiled?! Inside the transform a function with one parameter is called. At least MS VC++ 2010 compiles it without problem.
In any case you can write
1 2
std::transform( s.begin(), s.end(), s.begin(),
[] ( char c ) { return ( std::toupper( c ) ); } );
std::transform( s.begin(), s.end(), s.begin(),
[] ( char c ) { return ( std::toupper( c ) ); } );
MS VC++ 2010 Ultimate gives:
error C2039: 'transform' : is not a member of 'std'
error C2039: 'toupper' : is not a member of 'std'
error C3861: 'transform': identifier not found
error C2039: 'toupper' : is not a member of 'std'
-----------------------------------------
EDITED:
Works fine and without any errors, but must be like this:
1 2 3
#include <algorithm>
std::transform( s.begin(), s.end(), s.begin(),
[] ( char c ) { return ( toupper( c ) ); } );