1.. title:: clang-tidy - modernize-deprecated-headers 2 3modernize-deprecated-headers 4============================ 5 6Some headers from C library were deprecated in C++ and are no longer welcome in 7C++ codebases. Some have no effect in C++. For more details refer to the C++ 14 8Standard [depr.c.headers] section. 9 10This check replaces C standard library headers with their C++ alternatives and 11removes redundant ones. 12 13Important note: the Standard doesn't guarantee that the C++ headers declare all 14the same functions in the global namespace. The check in its current form can 15break the code that uses library symbols from the global namespace. 16 17* `<assert.h>` 18* `<complex.h>` 19* `<ctype.h>` 20* `<errno.h>` 21* `<fenv.h>` // deprecated since C++11 22* `<float.h>` 23* `<inttypes.h>` 24* `<limits.h>` 25* `<locale.h>` 26* `<math.h>` 27* `<setjmp.h>` 28* `<signal.h>` 29* `<stdarg.h>` 30* `<stddef.h>` 31* `<stdint.h>` 32* `<stdio.h>` 33* `<stdlib.h>` 34* `<string.h>` 35* `<tgmath.h>` // deprecated since C++11 36* `<time.h>` 37* `<uchar.h>` // deprecated since C++11 38* `<wchar.h>` 39* `<wctype.h>` 40 41If the specified standard is older than C++11 the check will only replace 42headers deprecated before C++11, otherwise -- every header that appeared in 43the previous list. 44 45These headers don't have effect in C++: 46 47* `<iso646.h>` 48* `<stdalign.h>` 49* `<stdbool.h>` 50