January 30, 2023 Genel » Re: enum'lara nitelikli CT işlevi yükleme | |||
|---|---|---|---|
| |||
...S {
float a, b;
alias opBin = float delegate();
opBin[string] ops;
}
void main() {
S s... | |||
January 30, 2023 Learn » Re: More Elegant Settable Methods? | |||
|---|---|---|---|
| |||
...the delegate? What exactly do you want to do? Set after constructor or assign delegate... | |||
January 29, 2023 Issues » [Issue 2525] Can't use `override` when implementing abstract base class's interface function | |||
|---|---|---|---|
| |||
...error Fix 2525: make forAllInterfaces take a delegate issue 2525: add unit tests issue 2525... | |||
January 23, 2023 General » Re: Trying to use Mir ion, its a perfect example of the failure of D's attribute system | |||
|---|---|---|---|
| |||
...scope int delegate(string) callback)
{ return callback(""); }
}
struct S2
{
int opApply (scope int delegate(string... | |||
January 20, 2023 General » Re: Trying to use Mir ion, its a perfect example of the failure of D's attribute system | |||
|---|---|---|---|
| |||
...a `@called` attribute that indicates the function delegate may be called inside the function, meaning... | |||
January 20, 2023 General » Re: Trying to use Mir ion, its a perfect example of the failure of D's attribute system | |||
|---|---|---|---|
| |||
...we can write:
```d
void callInSequence(void delegate() attrib @safe dgs[])
{
foreach(dg; dgs)
dg... | |||
January 20, 2023 General » Re: Trying to use Mir ion, its a perfect example of the failure of D's attribute system | |||
|---|---|---|---|
| |||
...types that include delegate or function pointer types somewhere: Slices of delegate or function pointer... | |||
January 20, 2023 General » Re: Trying to use Mir ion, its a perfect example of the failure of D's attribute system | |||
|---|---|---|---|
| |||
...when the delegate takes parameters, say `int`: ```D /*A*/ void process(void delegate(int) callback... | |||
January 19, 2023 General » Re: Trying to use Mir ion, its a perfect example of the failure of D's attribute system | |||
|---|---|---|---|
| |||
Code:
````
void process()(void delegate() cb) { cb(); }
void gcFunc() {
int[] a;
process({ a = new int... | |||
January 19, 2023 General » Re: Trying to use Mir ion, its a perfect example of the failure of D's attribute system | |||
|---|---|---|---|
| |||
Consider:
void delegate() dg;
// no error
void process(void delegate() userData) @nogc { dg = userData; }
// Error... | |||
Copyright © 1999-2021 by the D Language Foundation