On Friday, 29 March 2024 at 00:37:21 UTC, Jonathan M Davis wrote:
On Thursday, March 28, 2024 4:21:03 PM MDT Salih Dincer via
Digitalmars-d- learn wrote:
How can we add all members of an enum type to a list without
duplicating code?
As the documentation for EnumMembers explains, you can use
On Thursday, March 28, 2024 4:21:03 PM MDT Salih Dincer via Digitalmars-d-
learn wrote:
> How can we add all members of an enum type to a list without
> duplicating code?
As the documentation for EnumMembers explains, you can use
std.meta.NoDuplicates to strip out duplicates if you want to do
On Thursday, 10 August 2023 at 08:33:13 UTC, Christian Köstlin
wrote:
I think one part of the original question (now fanished in the
nntp backup) was how to get all enum members into a list
without duplicating code.
```d
import std.traits : EnumMembers;
import std.stdio : writeln;
import
On Wednesday, August 2, 2023 12:19:55 PM MDT Cecil Ward via Digitalmars-d-
learn wrote:
> Am I right in thinking that final switch can be used to check
> that all the elements in an enum are handled in cases? Thinking
> that this is a worthwhile safety check, I’d like to convert an
> existing list
Am I right in thinking that final switch can be used to check
that all the elements in an enum are handled in cases? Thinking
that this is a worthwhile safety check, I’d like to convert an
existing list into an enum for use in a final switch. I have an
existing list which I use elsewhere,