In C++, can you have a templated operator on a class? Like so:
class MyClass { public: template T operator()() { /* return some T */ }
You need to specify T.
T
int i = c.operator()();
Unfortunately, you can't use the function call syntax directly in this case.
Edit: Oh, and you're missing public: at the beginning of the class definition.
public: