typedef
seems to be C++ specific (perhaps in some other languages). I find it hides the real data type of the value, thus is confusing someone new to the project. Perhaps it is useful to shorten the typing sometimes. When do you recommend the use of typedef
?
I also notice I can't pass a typedef-ed value to a function that accepts the underlying type?
something like:
typedef string VAL;
VAL s = "x";
func(string x); // if I try to pass `s`, I get something like no instance of function template match argument list