From 8e145c09f76da8d037e0fd9a25088ce2ca9854aa Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 2 Jun 2022 14:01:09 -0700 Subject: [PATCH] IWYU cleanup ``` iwyu version: include-what-you-use 0.17 based on Debian clang version 13.0.1-3+build2 ``` Command used: ``` iwyu -c -std=c++17 -DPYBIND11_TEST_BOOST -Iinclude/pybind11 -I/usr/include/python3.9 -I/usr/include/eigen3 include/pybind11/pytypes.cpp ``` pytypes.cpp is a temporary file: `#include "pytypes.h"` The raw output is very long and noisy. I decided to use `#include ` instead of `#include ` for `std::size_t` (iwyu sticks to the manual choice). I ignored all iwyu suggestions that are indirectly covered by `#include `. I manually verified that all added includes are actually needed. --- include/pybind11/pytypes.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 87d789ad2b..f9625e77ea 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -12,10 +12,15 @@ #include "detail/common.h" #include "buffer_info.h" -#include +#include +#include #include +#include +#include +#include #include #include +#include #include #if defined(PYBIND11_HAS_OPTIONAL)