September 23 General » Re: Proposed Changes to the Range API for Phobos v3 | |||
|---|---|---|---|
| |||
...sw.stop();
writefln("%s took %s hnsecs", __traits(identifier, F), sw.peek.total!"hnsecs");
}
return... | |||
September 21 Learn » Poor Carlos does not manage to find where to eat | |||
|---|---|---|---|
| |||
...T t)
if (__traits(hasMember, T, "wantsBeer")
&& (__traits(hasMember, T, "wantsFries"))
//&& (!__traits(hasMember, T, "wantsShrimps... | |||
September 20 Issues » [Issue 24776] New: Struct with anonymous union has wrong isZeroInit | |||
|---|---|---|---|
| |||
...union {
int i1;
float f1;
}
}
static assert(__traits(isZeroInit, S6)); // fails
S6.init should be... | |||
September 20 Learn » Re: need help to work around float union non-zero init | |||
|---|---|---|---|
| |||
...test_t{
somevalue a=void;
}
static assert(__traits(isZeroInit, test_t));
unittest{
test_t foo... | |||
September 20 Learn » need help to work around float union non-zero init | |||
|---|---|---|---|
| |||
...f32;
}
}
static assert(__traits(isZeroInit, test_t) );
```
```sh
Error: static assert: `__traits(isZeroInit, test_t... | |||
September 12 DIP Ideas » Re: Enumerated Unions (sum types) | |||
|---|---|---|---|
| |||
...itself will be visible to reflection (via `__traits(allMembers)`, which includes hidden fields), and will... | |||
September 11 Issues » [Issue 24762] New: @nogc false positive error | |||
|---|---|---|---|
| |||
...nogc void f() {
S s;
auto x = __traits(getMember, s, m()); // Error: `@nogc` function `nogc... | |||
September 11 DIP Development » First Draft: Member of Operator | |||
|---|---|---|---|
| |||
...Which is equivalent to: ```d Enum var = __traits(getMember, Enum, "Identifier"); ``` In a switch statement... | |||
September 09 DIP Ideas » Re: import(__FILE_LITERAL__) | |||
|---|---|---|---|
| |||
Yeah you can ignore the remark about __traits. It was because I didn't see... | |||
September 09 DIP Ideas » Re: import(__FILE_LITERAL__) | |||
|---|---|---|---|
| |||
...compile-time Quine, but what else ? In D reflexion is supposed to work with `__traits`. | |||
Copyright © 1999-2021 by the D Language Foundation