Date: Sun, 12 Apr 2026 19:36:16 -0700
On Sunday, 12 April 2026 08:15:53 Pacific Daylight Time Alejandro Colomar via
Std-Proposals wrote:
> If C++ wants to keep any compatibility with C, you will never be able to
> reuse it. We're currently dealing with the consequences of 'auto' in C,
> and they're small because it was never used that much in C either. But
> breaking typedef would be like declaring that C++ will stop being
> compatible with C at all.
It's not just C. There's a LOT of C++ code using typedef, either because it
was written before C++11, before the author knew about using, because the
coding style around it used typedefs, because the author likes typedef better,
or one of another number of reasons.
This is not another case of register, where the usage was quite limited and
could be removed with no ill effects. It's not even a case of volatile, where
the most frequent use is incorrect and deserves the be fixed.
Unless we deprecate typedef and begin issuing warnings -- which we can't and
won't -- it will not disappear from C++ codebases.
Std-Proposals wrote:
> If C++ wants to keep any compatibility with C, you will never be able to
> reuse it. We're currently dealing with the consequences of 'auto' in C,
> and they're small because it was never used that much in C either. But
> breaking typedef would be like declaring that C++ will stop being
> compatible with C at all.
It's not just C. There's a LOT of C++ code using typedef, either because it
was written before C++11, before the author knew about using, because the
coding style around it used typedefs, because the author likes typedef better,
or one of another number of reasons.
This is not another case of register, where the usage was quite limited and
could be removed with no ill effects. It's not even a case of volatile, where
the most frequent use is incorrect and deserves the be fixed.
Unless we deprecate typedef and begin issuing warnings -- which we can't and
won't -- it will not disappear from C++ codebases.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel Data Center - Platform & Sys. Eng.
Received on 2026-04-13 02:36:23
