Search

January 30, 2023
Genel »
...S {
  float a, b;

  alias opBin = float delegate();
  opBin[string] ops;
}

void main() {
    S s...
January 30, 2023
Learn »
...the delegate? What exactly do you want to do?  Set after constructor or assign delegate...
January 29, 2023
Issues »
...error

  Fix 2525: make forAllInterfaces take a delegate

  issue 2525: add unit tests

  issue 2525...
January 23, 2023
General »
...scope int delegate(string)       callback)
    { return callback(""); }
}
struct S2
{
    int opApply     (scope int delegate(string...
January 20, 2023
General »
...a `@called` attribute that indicates the function delegate may be called inside the function, meaning...
January 20, 2023
General »
...we can write:

```d
void callInSequence(void delegate() attrib @safe dgs[])
{
    foreach(dg; dgs)
        dg...
January 20, 2023
General »
...types that include delegate or function pointer types somewhere: Slices of delegate or function pointer...
January 20, 2023
General »
...when the delegate takes parameters, say `int`:
```D
/*A*/ void process(void delegate(int) callback...
January 19, 2023
General »
Code:

````
void process()(void delegate() cb) { cb(); }

void gcFunc() {
	int[] a;
	process({ a = new int...
January 19, 2023
General »
Consider:

 void delegate() dg;

 // no error
 void process(void delegate() userData) @nogc { dg = userData; }

 // Error...
36 37 38 39 40 41 42 43 44 45 46 47
Next ›   Last »