diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-09-28 20:26:15 +0200 |
---|---|---|
committer | Rodrigo <rodarima@gmail.com> | 2025-09-28 23:10:55 +0200 |
commit | fb510ea86be5ceb9e91573890242581fdbd77ad8 (patch) | |
tree | d819fe40683592008d136727f5a0b03e48dc1164 /183 |
Diffstat (limited to '183')
-rw-r--r-- | 183/index.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/183/index.md b/183/index.md new file mode 100644 index 0000000..1157635 --- /dev/null +++ b/183/index.md @@ -0,0 +1,16 @@ +Title: Make headers self-contained +Author: rodarima +Created: Mon, 03 Jun 2024 19:24:31 +0000 +State: open + +In the current state of the implementation, headers are not self-contained. That is, when a header is included it may not include itself some other required headers, assuming the caller would have included it. + +There shouldn't be any prior dependency on any other header, so they can be easily changed and moved around. This also helps identify dependencies among code. + +This tool can help: https://include-what-you-use.org/ + +--%-- +From: kalvdans +Date: Mon, 03 Jun 2024 20:42:14 +0000 + +It's a common practise for `foo.cc` to include `foo.hh` as its first include. That way, the compilation will test that the header is self-containing. Would you accept a pull request that changes all source files to include "their" header file first?
\ No newline at end of file |