June 26, 2023 Issues » [Issue 24015] New: C#-style indented delimited strings | |||
|---|---|---|---|
| |||
...is a multi-line
heredoc string
EOS";
assert(str == "This\nis a multi-line\nheredoc... | |||
June 23, 2023 Learn » Re: static if - unexpected results | |||
|---|---|---|---|
| |||
``` static assert(__traits(isPOD, int)); // ok. static assert(__traits(isPOD, byte)); // ok. ``` It's a... | |||
June 23, 2023 Learn » static if - unexpected results | |||
|---|---|---|---|
| |||
...writeln("` ~ VarName ~ ` ", " is an int");` ~
`} else {` ~
`static assert(false, "mxnTst Variable '` ~ VarName ~ `' is of unknown... | |||
June 22, 2023 Issues » [Issue 24010] New: Destructor called before end of scope for tuples | |||
|---|---|---|---|
| |||
...n");
i = 1;
}
printf("%d\n", i);
assert(i == 4);
}
```
The assertion fails.
Looking at... | |||
June 21, 2023 General » Re: Help! | |||
|---|---|---|---|
| |||
...0 1 2 3 4 5 6
[ ]
[ ]
[ ]
[ ]
[ ]
[ ]
*/
assert(x.equal!equal(
[[0, 1],
[1, 2... | |||
June 20, 2023 Learn » Re: A couple of questions about arrays and slices | |||
|---|---|---|---|
| |||
...int[](100); assert(a.length == 100); or int[] a; a.length = 100; assert(a.length... | |||
June 20, 2023 Issues » [Issue 23996] pragma(assume) | |||
|---|---|---|---|
| |||
...∧ Q } assert(P) { Q }
{ Q } assume(P) { P ∧ Q }
In D, `assert` is... | |||
June 20, 2023 Issues » [Issue 23996] pragma(assume) | |||
|---|---|---|---|
| |||
...assumption. They both mean the same thing. assert(): - code following is optimized with the assumption... | |||
June 20, 2023 Issues » [Issue 23996] pragma(assume) | |||
|---|---|---|---|
| |||
...assert might be used to validate function input, e.g. `isPrime(int x)` might `assert... | |||
June 20, 2023 Issues » [Issue 24003] New: return/scope inference does not end up in type to some degree | |||
|---|---|---|---|
| |||
...in the type:
```d
auto f() {}
static assert(is(typeof(&f) == void function() @safe nothrow... | |||
Copyright © 1999-2021 by the D Language Foundation