I
Ivan Liu
Hi, I have a question as in the title.
I have two choices. One is the template function
template <class T>
Add(T a, T b){ return a+b; }
and the template class or functor
template <class T>
class Add
{
public:
T operator () (T a, T b){ return a+b; };
};
which one is better?
I have two choices. One is the template function
template <class T>
Add(T a, T b){ return a+b; }
and the template class or functor
template <class T>
class Add
{
public:
T operator () (T a, T b){ return a+b; };
};
which one is better?