Comment #1 on issue 1093 by kimgr: stddef.h recommended in C++ code
https://github.com/include-what-you-use/include-what-you-use/issues/1093
I can confirm that the equivalent of `stl.c.headers.imp` is baked into IWYU by default.
IWYU mappings are not keyed by language, so the expectation that `size_t` should come from `<cstddef>` for C++ and `<stddef.h>` for C unfortunately does not hold.
Perhaps you could add an additional mapping file that just says `<stddef.h>` (private) is mapped to `<cstddef.h>` (public). Or, alternatively, provide an override symbol mapping from `size_t` (private) to `<cstddef>` (public). Though I suspect both of those will fail due to artificial constraints in IWYU.
I see there's a public-to-public mapping from `<stddef.h>` to `<cstddef>`, which I think means `<cstddef>` is accepted as a stand-in for `<stddef.h>`. So if you were to search-and-replace `<stddef.h>` to `<cstddef>` manually, at least IWYU should leave the existing code alone. Try on one file first to verify.