Possible Duplicate:
Overloading member methods with typedef aliases as parameters
I have following method
void setField(char x); and another overloaded methoed void setField(int8_t x);
This get compiled on all platform other than solaris, on solaris int8_t is typedef as char
Is there any way to resolve this issue, as I do not want to change the name of the method
I get compiler error saying that method already exists
there is no way to resolve this. A typedef is just another name for the same type. But you can only overload on different types. So in your case – the compiler sees to setField(char x).
Why do you need those 2 methods? Since sizeof(char) is 1 according to the standard, there’s really no difference between those names.