Iain Sandoe <i...@sandoe.co.uk> writes: > The standard has the concept of an “importable header” which is > implementation-defined.
But it must contain all the C++ library headers: https://eel.is/c++draft/headers#4 > We could choose that only headers that are self-contained (i.e. unaffected > by external defines) are “importable” (thus the remaining headers would > not be eligible for include-translation). That would mean that we could > rely on processing any import by processing the header it is created from? > Perhaps that is too great a restriction and we need to be more clever. It will also be hard to determine whether the header (or any header that it includes) satisfies this condition. You would probably want it to be "meaningfully self-contained" (since pretty much every header is not self-contained with regards to include guards) which I think will be hard to automate.