January 18, 2022 Learn » Re: How to alias | |||
|---|---|---|---|
| |||
I put this as a tip of the week in my late post: http://dpldocs... | |||
January 18, 2022 Learn » Re: alias and __VERSION__ condition doesn't play well | |||
|---|---|---|---|
| |||
It works until you have cyclic dependencies: https://run.dlang.io/is/wDDcK5 | |||
January 18, 2022 Learn » Re: alias and __VERSION__ condition doesn't play well | |||
|---|---|---|---|
| |||
Works for me: https://run.dlang.io/is/XZlvQ8 | |||
January 18, 2022 Learn » Re: alias and __VERSION__ condition doesn't play well | |||
|---|---|---|---|
| |||
...Beter workaround is: ```d import std.traits : Select; alias Foo = Select!(__VERSION__ >= 2098, TypeA, TypeB); ``` | |||
January 18, 2022 Learn » alias and __VERSION__ condition doesn't play well | |||
|---|---|---|---|
| |||
...static if (__VERSION__ >= 2098)
{
alias getAlias = TypeA;
}
else
{
alias getAlias = TypeB;
}
}
alias Foo = getAlias!();
```
Is... | |||
January 17, 2022 Issues » [Issue 22685] New: Template function instantiated with lambda and overload is nested incorrectly | |||
|---|---|---|---|
| |||
...d
import c : overloaded;
void twoArgs(alias a, alias b)() { }
void overloaded()() { }
--- c.d
void... | |||
January 17, 2022 Issues » [Issue 22676] fullyQualifiedName fails to compile with 2.098.1 relese -- there is some issue with call to __traits(isScalar .. | |||
|---|---|---|---|
| |||
...inst()
{
return fullyQualifiedName!(frop);
}
alias attr = __traits(getAttributes, _inst);
class frop
{
alias type_id = registry... | |||
January 17, 2022 Learn » Re: Dynamic array ot not | |||
|---|---|---|---|
| |||
...8]];
static assert(is(typeof(mArr1.array())));
alias R1 = typeof(mArr1);
static assert(isRandomAccessRange!R1... | |||
January 17, 2022 General » Re: bottom type as parameter or local variable, does that make sense? | |||
|---|---|---|---|
| |||
...its size is 0. You can't `alias` an expression, so the above is ill... | |||
January 16, 2022 General » Re: bottom type as parameter or local variable, does that make sense? | |||
|---|---|---|---|
| |||
...totally confused, could you clarify? Sounds like "alias x = noreturn.init;" I think it depends... | |||
Copyright © 1999-2021 by the D Language Foundation