Search

May 22, 2023
General »
...posix/sys/stat.d(651): Error: static assert:  `128u == 104u` is false
```

ldc version `1...
May 22, 2023
General »
...else version(linux) bar();
else version(fail_early) static assert(0);
else assert(0);
```

:o)
May 22, 2023
General »
...option of using run-time guards like  `assert(0)` / `throw new NotImplementedEx()` and even using...
May 22, 2023
General »
...in-d/Blog.Posted_2023_02_20.html#static-assert-patterns-arguably-harmful-for-porting
May 22, 2023
General »
...I prefer `static assert` to not be used, but the runtime `assert`. I have done...
May 22, 2023
General »
...Windows)  enum ExtraFunctionality = false;
else static assert(0, "system not accounted for");
```

(forgot to...
May 22, 2023
General »
...false;
else static assert(0, "system not accounted for");

The static assert is there because...
May 20, 2023
Issues »
...e) {}
    }
}

void main()
{
    auto c = new C;
    assert(c.aa.length == 0);
}
////////////////////////////////////////////////

This allows obtaining...
May 20, 2023
Issues »
...cgi?id=23930

          Issue ID: 23930
           Summary: assert(0) passed to function with noreturn parameter...
May 20, 2023
Issues »
...elpenguino+D@gmail.com

A simple one-liner:
```
if (assert(0) in int[noreturn].init) {}
```

--
77 78 79 80 81 82 83 84 85 86 87 88
Next ›   Last »