I know this might be a stupid question but I am not sure how to describe it properly.
When I try to call std::transform
function for example,
template < class InputIterator, class OutputIterator, class UnaryOperator >
OutputIterator transform ( InputIterator first1, InputIterator last1,
OutputIterator result, UnaryOperator op )
one may write UnaryOperator op;
and then call transform(..,..,.., op);
However I also see people write just transform(..,..,..,UnaryOperator());
My question is: is it true that classname()
is equivalent to a class object?