Tutorial by Topics: aliases



The typedef and (since C++11) using keywords can be used to give a new name to an existing type.

With type aliases, we can give a alias to other type. It's ideal for giving a name to function types like (String) -> Boolean or generic type like Pair<Person, Person>.

Type aliases support generics. An alias can replace a type with generics and an alias can be generics.


Page 1 of 1