#C++ is weird.
1 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
for the first one, same reason this is legal
struct Node {
Node* next;
};
incomplete types can still be named in certain contexts where the type isn't required to be complete
for the second, an alias isn't a type and cannot be forward declared, the alias cannot behave like an incomplete type
I see, so I can't use an alias as a type in the alias definition? (not even sure if definition is the correct word here)
Kinda of like the same way I can't do something like:
struct A {
A foo;
};
?
I mean one is using a undeclared identifier and the other is using a incomplete type, but I think they are similar scenarios
Maybe if using Integer; was made legal it would work.
This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.