I have a Foo class:
class Foo {
template <typename T>
T* operator () (void) {
return (T*) something;
}
}
T cannot be deduced, but I want you to be able to say something like
Foo foo;
type_t bar = foo <type_t> ();
But this is a syntax error.
Is there any way to do this? (or perhaps the best way to pass a type without providing an instance of the type?)
source
share