I know that in C++11 we can now use using
to write type alias, like typedef
s:
typedef int MyInt;
Is, from what I
Both keywords are equivalent, but there are a few caveats. One is that declaring a function pointer with using T = int (*)(int, int);
is clearer than with typedef int (*T)(int, int);
. Second is that template alias form is not possible with typedef
. Third is that exposing C API would require typedef
in public headers.