December 08, 2021 Learn » Re: Struct fields and properties as alias members | |||
|---|---|---|---|
| |||
yes, you do. the alias param passes the abstract idea of the variable instead of... | |||
December 08, 2021 Learn » Re: Struct fields and properties as alias members | |||
|---|---|---|---|
| |||
It's a CPU simulator and the function needs to operate on half of a... | |||
December 08, 2021 Learn » Re: Struct fields and properties as alias members | |||
|---|---|---|---|
| |||
[...] Why not pass the entire struct by ref? T -- Who told you to swim in... | |||
December 08, 2021 Learn » Re: Struct fields and properties as alias members | |||
|---|---|---|---|
| |||
It might help if you elaborate a bit more on what exactly you're trying... | |||
December 08, 2021 Learn » Re: Struct fields and properties as alias members | |||
|---|---|---|---|
| |||
I considered just having a `ref int` parameter, but I didn't think that would... | |||
December 08, 2021 Learn » Struct fields and properties as alias members | |||
|---|---|---|---|
| |||
...member of a struct as a template alias parameter and I don't really understand... | |||
December 08, 2021 Learn » Re: Any workaround for "closures are not yet supported in CTFE"? | |||
|---|---|---|---|
| |||
...stdio, std.traits, core.lifetime;
auto partiallyApply(alias fun,C...)(C context){
return &new class... | |||
December 08, 2021 Issues » [Issue 13119] `struct` constructor attributes inferred like field destructor is called on initialization | |||
|---|---|---|---|
| |||
...is introducing a dtor
call
}
}
Two workarounds:
alias AliasSeq(T...) = T;
s = AliasSeq!(0, 1... | |||
December 08, 2021 Issues » [Issue 22579] Unittests defined in a template are instantiated indiscriminately in betterC mode AND cause inscrutable errors | |||
|---|---|---|---|
| |||
...new B(), null];
}
}
--- main.d
import issue22579;
alias _ = canon!"";
extern(C) int main() { return 0... | |||
December 08, 2021 Learn » Re: Any workaround for "closures are not yet supported in CTFE"? | |||
|---|---|---|---|
| |||
...interface ICallable
{
void opCall() const;
}
auto makeDelegate(alias fun, Args...)(auto ref Args args)
{
return... | |||
Copyright © 1999-2021 by the D Language Foundation