The question is pretty much in the title. According to C++ Reference, std::endl is actually a function. Looking at its declaration in
Though it's a function [template], standard stream manipulators are designed to be sent to streams as function pointers (or functor object references). Inserting the result of a function call won't give you anything but the value that results from that function call.
This means that you stream the functor itself (f), rather than the result of calling it (f()).