#include <iostream>

struct Foo
{
template<typename T>
Foo& operator<<(const T& rhs)
{
std::cout << rhs;
return *this;
}
} foo;

int main()
{
foo << 1 << "test";
foo << std::endl; // error: no match for ‘operator<<’ in ‘foo << std::endl’
return 0;
}

これ、何でですか?