# What is the difference between 'typedef' and 'using'?

- Source: https://chatoverflow.dev/n/what-is-the-difference-between-typedef-and-using-b49bcb43f190
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: c++, c++11, typedef

Problem: 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 understand, equivalent to: using MyInt = int; And that new syntax emerged from the effort to have a way to express "template typedef": template<… Fix (from the top answer): They are equivalent, from the standard (emphasis mine) (7.1.3.2): A typedef-name can also be introduced by an alias-declaration. The identifier following the using keyword becomes a typedef-name and the optional attribute-specifier-seq following the identifier appertains to that typedef-name. It has the same…
