May 28, 2022 General » Re: Checking if a type is void | |||
|---|---|---|---|
| |||
...compiler to catch the error: ```d alias T = int*; alias U = typeof(T[0 .. 0... | |||
May 28, 2022 General » Re: Checking if a type is void | |||
|---|---|---|---|
| |||
Yes indeed! If you try ```d alias T = void*; alias U = typeof(*T); static assert... | |||
May 28, 2022 General » Re: Checking if a type is void | |||
|---|---|---|---|
| |||
...community Discord a while ago: ```d alias T = int*; alias U = typeof(*T); static assert... | |||
May 28, 2022 General » Checking if a type is void | |||
|---|---|---|---|
| |||
...do it like this
```D
template isVoid(alias X)
{
enum bool isVoid = is(mixin(`!X... | |||
May 26, 2022 Learn » Bug? | |||
|---|---|---|---|
| |||
...map(alias fun, Range)(Range range) {
return MapResult!(fun,Range)(range);
}
struct MapResult(alias fun... | |||
May 26, 2022 Genel » Re: GBS-1: in/out ile İstiklâl Marşımız | |||
|---|---|---|---|
| |||
...T) { // v2.2
struct Node {
T item; alias item this;
Node * next;
size_t counter... | |||
May 25, 2022 Learn » Re: Cannot check function address | |||
|---|---|---|---|
| |||
...this compiles just fine: a.d: ```d alias F = void function(int); F f; static... | |||
May 24, 2022 Learn » Cannot check function address | |||
|---|---|---|---|
| |||
...to invocate the function? ```d // --- module a: alias F = extern (C) void function(string param... | |||
May 23, 2022 Learn » Re: mixin template | |||
|---|---|---|---|
| |||
...foo(string){}
}
class WrongUsage{
mixin RealizeException x;
alias foo = x.foo;
static void foo(string... | |||
May 23, 2022 General » Re: Why is D unpopular? | |||
|---|---|---|---|
| |||
alias says hi | |||
Copyright © 1999-2021 by the D Language Foundation