I did an online coding contest, and I decided to find a header that has a shorter name than <iostream>, but includes <iostream>. Well, I still have not succeeded, but it made me think:
Does the standard indicate which headings include other headings?
For example, <iostream> cplusplus says:
The inclusion of this header can automatically include other headers, such as <ios>, <streambuf>, <istream>, <ostream>and / or <iosfwd>.
However, when I search <ios>, there is no such statement as "This title may be included <iostream>." For some headlines, I could imagine that they needed to include others for them to work properly. And if so, I would expect the standard to make some assertion about how the headers depend on each other (for example, circular dependencies should be avoided). Or does the standard simply certify that such dependencies do not exist, and it depends on the implementation?
source
share