Post #1981548
2026-05-04 11:21 UTC
@Fiona typeof is the way that it is expressly for inter-language compatibility
decltype chose a different keyword at the time it was introduced because C++ needs additional semantics that aren't in the GCC precedent and would retroactively break C if it was given that name
the name was therefore intentionally left available by WG21 for the C Committee to do something with
typeof can still be trivially implemented as a macro using features from if you need it for compatibility in C++
@typeswitch
Replies (0)
No replies.