Search

January 03, 2023
Learn »
...k, v);

static assert(is(typeof(res[0]) == const(string))); // false
static assert(is(typeof...
January 03, 2023
Learn »
...k, v);

        static assert(is(typeof(result[0]) == const(string)));
        static assert(is(typeof(result...
January 02, 2023
General »
...if(exp==1) assert(r == base);
            else if(r == invalid!T)
            {
               assert(T.max / safePow...
January 01, 2023
Genel »
...c; decodedText)
  {
    c.writefln!"%4X: %s"(c);
  }

  assert(decodedText.length == 7);
} /* ÇIKTISI:
  59: Y
  49...
December 31, 2022
Learn »
...sizeof;

    // HERE:
    const objectAddrInDynamicMemory = cast(void*)c;

    assert(objectAddrInDynamicMemory + likelyOffsetOfMembers == &c.i);
}

If the class...
December 30, 2022
General »
...I used to write a lot of:

    assert(p != NULL);

It was very effective. But...
December 30, 2022
General »
...a fatal error by typing e.g. `assert(0)`. Not accidentally forgetting to handle null...
December 30, 2022
Issues »
...i);
    int y = cast(real function(char))assert(0);
    return x + y;
}
---

Introduced by https...
December 30, 2022
General »
...or null made explicit

if(obj){
    static assert(is(typeof(obj)==Object)); // ok, checked
    // can...
December 28, 2022
Learn »
...of the 'static assert' is true.
(2) comment out the static assert.

Once you do...
113 114 115 116 117 118 119 120 121 122 123
Next ›   Last »