need help to check symbol is static variable or not

Dakota dakota at gmail.com
Mon Jul 15 06:44:12 UTC 2024


On Monday, 1 July 2024 at 11:15:46 UTC, Nick Treleaven wrote:
> ```


There is a case check will give wrong resutls:


```d
struct type_s
{

     union {
         struct
         {
             int a;
             int b;
         } c;
     };
};
```

`type c` will return false with `enum isStatic(alias V) = 
__traits(compiles, { enum v = V; });`

type_s is from importC with DMD v2.110.0-beta.1.



More information about the Digitalmars-d-learn mailing list