January 03, 2023 Learn » Re: How should I return multiple const values from a function? | |||
|---|---|---|---|
| |||
...k, v); static assert(is(typeof(res[0]) == const(string))); // false static assert(is(typeof... | |||
January 03, 2023 Learn » Re: How should I return multiple const values from a function? | |||
|---|---|---|---|
| |||
...k, v);
static assert(is(typeof(result[0]) == const(string)));
static assert(is(typeof(result... | |||
January 02, 2023 General » Re: Metaprog can be abstruse | |||
|---|---|---|---|
| |||
...if(exp==1) assert(r == base);
else if(r == invalid!T)
{
assert(T.max / safePow... | |||
January 01, 2023 Genel » Re: Dönüştürme Yöntemleri | |||
|---|---|---|---|
| |||
...c; decodedText)
{
c.writefln!"%4X: %s"(c);
}
assert(decodedText.length == 7);
} /* ÇIKTISI:
59: Y
49... | |||
December 31, 2022 Learn » Re: Address of a class object | |||
|---|---|---|---|
| |||
...sizeof;
// HERE:
const objectAddrInDynamicMemory = cast(void*)c;
assert(objectAddrInDynamicMemory + likelyOffsetOfMembers == &c.i);
}
If the class... | |||
December 30, 2022 General » Re: Fixing C's Biggest Mistake | |||
|---|---|---|---|
| |||
...I used to write a lot of:
assert(p != NULL);
It was very effective. But... | |||
December 30, 2022 General » Re: Fixing C's Biggest Mistake | |||
|---|---|---|---|
| |||
...a fatal error by typing e.g. `assert(0)`. Not accidentally forgetting to handle null... | |||
December 30, 2022 Issues » [Issue 23591] New: [REG 2.101] Invalid casts accepted by the compiler if from type is noreturn | |||
|---|---|---|---|
| |||
...i);
int y = cast(real function(char))assert(0);
return x + y;
}
---
Introduced by https... | |||
December 30, 2022 General » Re: Fixing C's Biggest Mistake | |||
|---|---|---|---|
| |||
...or null made explicit
if(obj){
static assert(is(typeof(obj)==Object)); // ok, checked
// can... | |||
December 28, 2022 Learn » Re: Compile time vs run time -- what is the difference? | |||
|---|---|---|---|
| |||
...of the 'static assert' is true. (2) comment out the static assert. Once you do... | |||
Copyright © 1999-2021 by the D Language Foundation