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
Inconsistent class-key in class template declarations #534
Comments
Compilers don't compile declarations in the standard. |
My point is that the aforementioned usage can be irritating. Also, yes they do, as the declarations are put into headers by compiler-devs that themselves are compiled when including them - unless I'm mistaken? (Of course, standard headers don't produce warnings, but a specialization of tuple_size necessarily does, which is annoying!) |
Compilers do not compile the standard, they compile headers that come with their implementation. The implementation headers can use whatever class-keys they want to, they don't have to match the standard, and changing the standard doesn't mean implementations will change. |
Nor do I, I use |
Users who tolerate those bogus warnings should find something more productive to do. -------- Original message -------- Nor do I, I use class and struct interchangeably (I don't like class with struct-like layout for example, no private members, etc). If any compiler where to warn about that I would just use a flag to silent such warning. — |
Closing; while consistency in presentation is generally important, in this case I don't think the comprehensibility or style of the standard is affected. |
I've captured the original intent of the issue re-reading it now... Well in that case it seems understandable, but it's bogus nonetheless. Personally I use |
@zygoloid It might be sensible to uncouple Edit: Hmm, a bit of research reveals that this is partially relevant for linking, as the VS ABI appears to link |
@Arcoth, I still don't understand why you think the use of |
I don't (anymore).
I was talking about Clang's nonsensical warning that annoyed me, which was the original incentive for opening this issue. I asked a Clang dev above whether removing it from |
You do realize this is not the place to ask your vendor to do something very specific to your compiler. -------- Original message -------- I still don't understand why you think the use of struct or class here in the standard has anything to do with warnings from your compiler. I don't. If you get warnings complain to your std::lib vendor, but this is not the right venue. I was talking about Clang's nonsensical warning that annoyed me, which was the original incentive for opening this issue. I asked a Clang dev above - apparently you're not welcoming OT. I'll ask somewhere else then. — |
Declarations such as e.g.
Use
struct
andclass
interchangeably. While this is not a defective thing per se (see §7.1.6.3/3), compilers do warn about inconsistent usage of both and it should be tidied up.The text was updated successfully, but these errors were encountered: