I’m having some trouble overloading methods in C++.
typedef char int8_t;
class SomeClass{
public:
…
void Method(int8_t paramater);
void Method(char paramater
... they may refer to the same type in which case overloading won’t work. I want to make them work at the same time?
Fortunately that's not possible (even with templates
). Because it kills the very purpose of a typedef
.
If you intend to do this in your code then it's a code smell; you may have to change your design.