#include <iostream>
using namespace std;
class mah_class
{
public:
template <class T>
void operator<<(const T & t )
{
t( *this );
}
};
void func( mah_class & c )
{
//do something useful with c
std::cout << "test";
}
int main() {
mah_class c;
c<<func;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY2xhc3MgbWFoX2NsYXNzCnsKcHVibGljOgoJdGVtcGxhdGUgPGNsYXNzIFQ+Cgl2b2lkIG9wZXJhdG9yPDwoY29uc3QgVCAmIHQgKQoJewoJCXQoICp0aGlzICk7Cgl9Cn07Cgp2b2lkIGZ1bmMoIG1haF9jbGFzcyAmIGMgKQp7CgkvL2RvIHNvbWV0aGluZyB1c2VmdWwgd2l0aCBjCglzdGQ6OmNvdXQgPDwgInRlc3QiOwp9CgppbnQgbWFpbigpIHsKCW1haF9jbGFzcyBjOwoJYzw8ZnVuYzsKCXJldHVybiAwOwp9