> For the complete documentation index, see [llms.txt](https://cpp-clippy.gitbook.io/cpp-clippy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cpp-clippy.gitbook.io/cpp-clippy/rules/critical/crt-exp-06.md). Agents can also search and read this documentation through its [MCP server](https://cpp-clippy.gitbook.io/cpp-clippy/~gitbook/mcp).

# Rule CRT-EXP-06

Do no use typedef specifier

* **Classification:** *Required*
* **Offers Fixes:** *Yes*

## What it does?

The check converts the usage of *typedef* with *using* keyword.

## Why is this bad?

The typedef specifier can not be easily used for defining alias templates. Also, the typedef syntax makes the code less readable.&#x20;

For defining aliases, as well as template aliases, it is recommended to use the *using* syntax instead of the *typedef*.

## Example

```cpp
typedef std::int8_t (*PFI)(std::int8_t);   // Non-compliant
using PFI2 = std::int8_t (*)(std::int8_t); // Compliant
```

### See also

* Autosar March 2019: A7-1-6 The typedef specifier shall not be used.
* [C++ Core Guidelines: T.43 Prefer using over typedef for defining aliases](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rt-using)&#x20;
