Skip to content

Clean up <include>s#19

Merged
geneotech merged 3 commits intoTeamHypersomnia:masterfrom
lyorig:reorder_includes
Oct 15, 2025
Merged

Clean up <include>s#19
geneotech merged 3 commits intoTeamHypersomnia:masterfrom
lyorig:reorder_includes

Conversation

@lyorig
Copy link
Contributor

@lyorig lyorig commented Oct 15, 2025

There are some unnecessary/misplaced headers in finders_interface.h that emit warnings. This PR aims to:

  • remove unnecessary headers,
  • move necessary headers to where they're needed, and include them transitively, and
  • "decorate" technically unused, yet necessary-for-usage headers with // IWYU pragma: export.

I've also removed the <list> header from example/main.cpp (if anyone wants to try out the API with std::list, they can add it themselves), and added <utility> for std::as_const().

image

This is another minor edit to the code, but I think eliminating these warnings is worth it for further development.
Not tested yet on GCC/MSVC, I'll get to that soon (although CI/CD should tell us whether it compiles). The only caveat I can think of right now is that existing codebases could have unintentionally relied upon rectpack2D bringing in <utility>, the only actually unused header that has been removed.

There are some unnecessary headers in `finders_interface.h` that emit
warnings. This commit aims to:
- remove unnecessary headers,
- move necessary headers to where they're needed, and include them
transitively, and
- "decorate" technically unused, yet necessary-for-usage headers
with `// IWYU pragma: export`.
@geneotech
Copy link
Member

It compiles on CICD which tests MSVC, gcc and clang so I'd say it's alright.

@geneotech geneotech merged commit 61e8156 into TeamHypersomnia:master Oct 15, 2025
6 checks passed
@lyorig lyorig deleted the reorder_includes branch October 15, 2025 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants