While reading the standard, I was really surprised to see that actually, the name is optional in a declaration:
struct Magic {};
int main() {
int; // well-formed
Magic; // well-formed
}
For those interested to read the standard, it's because in a simple-declaration, the init-declarator-list is optional. Here's a demo.
And so I really want to know why this is allowed. Why would I ever want to do that? It really makes no sense to me. My reasoning is that, because if it makes no sense, why allow it?