On Monday, 18 April 2016 at 03:33:53 UTC, Adam D. Ruppe wrote:
The struct inside union is the main pure-language use case I know of though.

Actually curiously I found another potential use, applying attributes/UDAs to multiple members at once.

enum testUDA;
struct T{
        @testUDA
        immutable struct{
                int x;
                int y;
                int z;
        }
}

x,y,and z seem to all be immutable and all have the UDA testUDA. But even odder, it seems that "struct" in there is doing absolutely nothing. The same thing can be done with

enum testUDA;
struct T{
        @testUDA
        immutable{
                int x;
                int y;
                int z;
        }
}

So it still seems to be useless other than in the case of unions...

Reply via email to