Typedef declaration is superseded by type alias declaration since C++11, its legend seems to come to the end. However, we can make typedef
much more useful than it is, by allowing it to be used in acompany with variable declarations (including parameters and return types) and base-clause in a class declaration.
Everyone who loves templates are likely to face a problem - the name of the type being specified is too long that we don't want to spell it out twice! Although we have type alias, but unfortunately in many cases, it cannot be used at the first place and we are forced to spell the irritating names at least twice if we have to refer to the type more than once. Here are some examples: