Re: mixin template bug with opBinary?

2022-07-22 Thread Anthony Quizon via Digitalmars-d-learn
On Friday, 22 July 2022 at 12:56:44 UTC, Adam D Ruppe wrote: ``` mixin template opBi( alias f0 ) { static foreach (k, f; f0) { typeof(this) opBinary(string op: k)(typeof(this) r) { return f(this, r); } } } ``` Thanks, this seems to do the trick.

mixin template bug with opBinary?

2022-07-22 Thread Anthony Quizon via Digitalmars-d-learn
Hello, I'm trying to create a mixin for quick binary operator overloads by passing in types with a corresponding associative array of strings to functions. However, the code I currently have: ``` module foo; mixin template opBi( A, A function(A, A)[string] f0, ) { static foreach (k,

Re: tiny alternative to std library

2021-03-03 Thread Anthony Quizon via Digitalmars-d-learn
On Wednesday, 3 March 2021 at 14:17:02 UTC, Siemargl wrote: On Wednesday, 3 March 2021 at 14:12:54 UTC, Siemargl wrote: I test full rebuild of dlang-IDE (20k loc) now for dmd under Update, 20k loc without counting libraries. Thanks for the info. Yeah the times I'm trying to reach are

Re: tiny alternative to std library

2021-03-02 Thread Anthony Quizon via Digitalmars-d-learn
On Monday, 1 March 2021 at 08:52:35 UTC, Imperatorn wrote: On Thursday, 25 February 2021 at 22:39:11 UTC, Anthony wrote: Hello, I noticed that importing some std libraries causes the build time to jump to around 1 - 3 secs. I started creating my own helper functions to avoid importing std