#include <iostream>
void f(auto x)
{
std::cout << x;
}
int main()
{
f(std::hex); // okay
f(std::endl); // error
// candidate template ignored:
// couldn't infer template argument 'x:auto'
}
Why can't std::endl be passed as a function argument?