views:

84

answers:

1

If you define a type like typedef int MY_INT; and go on to overload, say, the adition operator of MY_INT like

MY_INT operator+(MY_INT a, MY_INT b);

will

MY_INT a, b;
a + b;

be different from

int A, B;
A + B;

?

Sorry for any syntax errors. I'm not near a compiler and I want to ask this before I forget about it.

+7  A: 

No. A typedef is actually an alias for another type. The original and typedef-ed types are the same.

David Rodríguez - dribeas