std.algorithm.countUntil and alias
Salih Dincer
salihdb at hotmail.com
Wed Oct 23 15:06:46 UTC 2024
On Wednesday, 23 October 2024 at 12:46:24 UTC, Paul Backus wrote:
> On Wednesday, 23 October 2024 at 12:32:09 UTC, Anton Pastukhov
> wrote:
>
> There are two possible solutions to this. One is to make
> `MyStruct.test` a `static` variable:
>
> ```d
> // Solution #1
> struct MyStruct {
> static Test test = Test.Three;
> }
> ```
The code also compiles like this. In this case, can we say that
there are 3 solutions or are static and enum actually the same
thing?
```d
struct MyStruct {
enum test = Test.Three
}
```
SDB at 79
More information about the Digitalmars-d-learn
mailing list