Search

May 28, 2022
General »
...compiler to catch the error:

```d
alias T = int*;
alias U = typeof(T[0 .. 0...
May 28, 2022
General »
Yes indeed!
If you try
```d
alias T = void*;
alias U = typeof(*T);
static assert...
May 28, 2022
General »
...community Discord a while ago:

```d
alias T = int*;
alias U = typeof(*T);
static assert...
May 28, 2022
General »
...do it like this

```D
template isVoid(alias X)
{
    enum bool isVoid = is(mixin(`!X...
May 26, 2022
Learn »
...map(alias fun, Range)(Range range) {
    return MapResult!(fun,Range)(range);
}


struct MapResult(alias fun...
May 26, 2022
Genel »
...T) {  // v2.2
  struct Node {
    T item; alias item this;
    Node * next;
    size_t counter...
May 25, 2022
Learn »
...this compiles just fine:

a.d:
```d
alias F = void function(int);
F f;

static...
May 24, 2022
Learn »
...to invocate the function?

```d
// --- module a:
alias F = extern (C) void function(string param...
May 23, 2022
Learn »
...foo(string){}
}

class WrongUsage{
    mixin RealizeException x;

    alias foo = x.foo;

    static void foo(string...
May 23, 2022
General »
alias says hi
216 217 218 219 220 221 222 223 224 225 226
Next ›   Last »