Search

November 09
Issues »
...convert to the enum type. But this compiles:

```
struct S {
    this(int) {}
}

enum E : S...
November 09
DIP Ideas »
...can be simulated through, nested classes:

```d
enum PI=3.141592f;

class Angle
{
    float radians...
November 09
Learn »
...the base type.

https://dlang.org/spec/enum.html#named_enums

I'm not sure...
November 08
Learn »
...dummyNumbericFunction(T)(T t){
  auto foo=t+t;
  ...
}
enum isNumbertic(T)=__traits(compiles,dummyNumbericFunction!T);
```
November 08
Learn »
...if(isNumeric!T) {
        value = v;
    }
}

enum Milligrams : BaseUnit!Milligrams;
enum Millimoles : BaseUnit!Millimoles;

unittest {
	Milligrams...
November 06
Issues »
...value of an    |to assign to an AA value of
                   |enum instance               |an enum instance

--
November 06
Issues »
...trying to access AA value of an
                    enum instance
           Product: D
           Version: D2
          Hardware: x86...
November 03
DIP Ideas »
...stable language

```C
#include <assert.h>

typedef enum {
  One, Two, Three, Four
} Numbers;

typedef struct...
November 01
DIP Ideas »
...42} } } );
}

```

This builds

This also build:

```C
enum State
{
    IDLE,
    RUN,
    ATTACK,
}


fn void main...
October 31
DIP Ideas »
Yesterday I was thinking to add that feature to another language (understand "one where there...
1 2 3 4 5 6 7
Next ›   Last »