On 8/19/20 10:06 AM, Victor Porton wrote:
This declaration does compile:

enum x;

But what is it? Is it an equivalent of

enum x { }

?

What in the specification allows this looking a nonsense

enum x;

?

I use it as a symbol for UDAs.

enum required;

struct S
{
   @required int x;
}

which can then easily be found.

What is it? I have no idea. I'm just using the name.

I think it's treated as a forward declaration. Kind of like

void foo();

-Steve

Reply via email to