New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odd phrasing makes C library dependent on C++ #470
Comments
No, the intent is to say the C headers don't include anything else, i.e. This doesn't seem editorial anyway. |
The intent is clear to me, but not to at least one StackOverflow user. It says "shall include only," but the intent is not to require that anything be included, which "shall" certainly does. The word "may" gives permission, which is the intent. Good phrases here would be "may only include" or "shall not include any C++ header besides the corresponding one." If it's really not editorial, I can file a DR, but this is a much easier way to deal with a very small erratum. |
Maybe that wording should have been adjusted by http://cplusplus.github.io/LWG/lwg-defects.html#456 |
Yes, the current phrasing does make sense within the model described as a problem, but not with the resolution. What's the next step? |
Suggestion: "The C standard library headers (D.4) shall not include C++ standard library headers other than their corresponding C ++ standard library header, as described in 17.6.1.2." |
Note also that we have exhaustive synopses of the cname headers now, so we do kind of tell you what we expect to be in those headers. |
The issue is still that we need to prohibit C headers from including C++ headers. We don't want <stddef.h> to make std::vector available, ever. |
How can we prevent that, given that is permitted to include ? Seems like an LWG issue to me. |
Agreed, I think this should be dealt with as a DR. |
[res.on.headers] §17.6.5.2/3 uses "shall" where the intent seems to be "may." It suggests that
<math.h>
must include<cmath>
.The text was updated successfully, but these errors were encountered: