Search

January 24, 2021
Issues »
...file1Task = task!sharedInc(f);
    file1Task.executeInNewThread();

    // Read bar.txt in parallel.
    sharedInc(f);

    // Get the...
January 23, 2021
Issues »
...r; range) bar(r);
}

void foo(TRange ...)()
{
        foreach(T; TRange) bar!T;
}

void bar(T...
January 23, 2021
General »
...template foo(T)
{
   void bar(T t) {}
}

__traits(getOverloads, foo!int, "bar") // ok!

Is there...
January 20, 2021
Learn »
...has to be `foo!bar`, so we need a type named `bar` to use for...
January 20, 2021
Learn »
...posting code then :(

fun!T just returns bar or null. Manually calling works.

but if...
January 20, 2021
Learn »
...traits(getMember, T, property);

  // typeof(S) = foo!bar

  static if (isCallable!S) {
      // some other magic...
January 19, 2021
Learn »
...2)
    pragma(msg, TENUM.bar);    // T(3)
    writeln(TENUM.foo);        // foo
    writeln(TENUM.bar);        // bar
}
January 17, 2021
Learn »
...example:

Will cause "called with argument types `(Bar!(2u, int))` matches both:DUB"
(And "undefined...
January 17, 2021
General »
...foo () {}
   }
   template S (T) {
      void bar () {}
   }

   auto fp = &S!int.bar;

depicts the programmer's...
January 16, 2021
General »
...std/datetime/stopwatch/benchmark.html

As simple as: auto timings = 1000.benchmark!(foo, bar, baz);
91 92 93 94 95 96 97 98 99 100 101
Next ›   Last »