P
Phil Endecott
Dear Experts,
I find myself wanting to write
class functor {
template <typename T>
T operator()(args) {...}
};
in order to
functor f;
sometype r = f<sometype>(3.14);
but I can't get anything to work. Is operator() allowed to be a
template function? (Maybe I am, because I only get errors at the point
where I try to use it.) If it is allowed, how am I supposed to call it?
Thanks for any clarification,
Phil.
I find myself wanting to write
class functor {
template <typename T>
T operator()(args) {...}
};
in order to
functor f;
sometype r = f<sometype>(3.14);
but I can't get anything to work. Is operator() allowed to be a
template function? (Maybe I am, because I only get errors at the point
where I try to use it.) If it is allowed, how am I supposed to call it?
Thanks for any clarification,
Phil.