Opinions on iterating a struct to absorb the decoding of a CSV?

cc cc at nevernet.com
Mon Apr 1 05:10:49 UTC 2024


On Monday, 1 April 2024 at 04:54:46 UTC, cc wrote:
> I scoured [Traits](https://dlang.org/spec/traits.html) and 
> [std.traits](https://dlang.org/phobos/std_traits.html) looking 
> for a simple method to tell whether a member was declared as 
> enum but couldn't find one, so if anyone knows a proper way to 
> do it please let me know.

Turns out this can be done as part of the panacea that is `is()` 
statements.
```d
static if (is(typeof({enum X = SYM;})))
```


More information about the Digitalmars-d-learn mailing list