[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 27 04:27:44 PDT 2025


AaronBallman wrote:

> Did WG14 considered some sort of macros for this feature? Otherwise I'd be tempted to ask you to add something to `__has_feature`. I can see user wanting to use `_Countof` when available and fallback to something else when not.

There is weak consensus to add `stdcountof.h` which supplies a `countof` macro. However, there's no changes to the standard which add one (yet), so I figured that can be done in a follow-up.


https://github.com/llvm/llvm-project/pull/133125


More information about the cfe-commits mailing list