This PR adds a tool that verifies every header whether it is self-contained.
As an example, the field_5x52.h
and field_10x26.h
headers have been refactored to get self-contained.
This PR adds a tool that verifies every header whether it is self-contained.
As an example, the field_5x52.h
and field_10x26.h
headers have been refactored to get self-contained.
Interesting!
This raises the question: Should self-containedness be tested in VERIFY mode, or non-VERIFY mode, or both? I believe at least in VERIFY mode because the goal here will be to help development tooling (e.g., clangd), and development is typically more convenient in VERIFY mode. Otherwise all #ifdef VERIFY
blocks don’t exist, i.e., you don’t even get syntax highlighting for them…
Of course, we could manage to make this happen in both modes without too much hassle, that will be ideal.
This is related to #1039, where I suggested something like this.
This is related to #1039, where I suggested something like this.
I’ve been working on this branch a few months but decided to PR it now as I feel it might help with #1421 (comment).