Should I use using or typedef?

Conclusion. When it comes to defining simpler type aliases, choosing between typedef and alias-declaration could be a matter of personal choice. However, while defining the more complex template aliases, function-pointer aliases, and array reference aliases, the alias-declaration is a clear winner .

Read more

Is it good to use typedef?

typedef is necessary for many template metaprogramming tasks — whenever a class is treated as a “compile-time type function”, a typedef is used as a “compile-time type value” to obtain the resulting type. … Note that template metaprogramming is not commonly used outside of library development.

Read more

Is it good to use typedef?

typedef is necessary for many template metaprogramming tasks — whenever a class is treated as a “compile-time type function”, a typedef is used as a “compile-time type value” to obtain the resulting type. … Note that template metaprogramming is not commonly used outside of library development.

Read more