Skip to content

Add missing includes#329

Merged
robUx4 merged 1 commit into
Matroska-Org:masterfrom
mstorsjo:missing-include
May 2, 2026
Merged

Add missing includes#329
robUx4 merged 1 commit into
Matroska-Org:masterfrom
mstorsjo:missing-include

Conversation

@mstorsjo
Copy link
Copy Markdown
Contributor

@mstorsjo mstorsjo commented May 1, 2026

This file uses std::nothrow, which requires including <new>.

This fixes building with libc++ with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES set (which removes unnecessary transitive dependencies, making it more strict wrt including all the right headers). This will become the default in a few versions, see [1].

This is only needed since commit 0d5873f. Older versions before b5475c3 require an extra include of in src/EbmlMaster.cpp.

[1] https://discourse.llvm.org/t/rfc-remove-unused-transitive-includes-from-the-libc-headers/90157

This file uses std::nothrow, which requires including <new>.

This fixes building with libc++ with
_LIBCPP_REMOVE_TRANSITIVE_INCLUDES set (which removes unnecessary
transitive dependencies, making it more strict wrt including all
the right headers). This will become the default in a few
versions, see [1].

This is only needed since commit
0d5873f. Older versions before
b5475c3 require an extra
include of <iterator> in src/EbmlMaster.cpp.

[1] https://discourse.llvm.org/t/rfc-remove-unused-transitive-includes-from-the-libc-headers/90157
@robUx4
Copy link
Copy Markdown
Contributor

robUx4 commented May 2, 2026

Not that this branch is the development branch and is not used (or shouldn't be) anywhere. The used branch is the v1.x one. I did a similar version for that branch in #334 with the issues I found with LLVM 22. GCC has also been going in the same direction so we definitely need to fix these.

@robUx4 robUx4 merged commit 7d5a090 into Matroska-Org:master May 2, 2026
20 of 24 checks passed
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