My intention is to refrain from macros style when I need to define a lot of similar methods. So I’m interested, can I use templates or anything like that?
This is the general idea in pseudo-c++:
template <class T, class U> void myMethod(T t, U u){ ..do a lot .. }
class A {
public:
A(){}
void myMethod<int, int>;
void myMethod<float, char>;
// ... etc
};
ADDED:
you may want to explicitly instantiate