Re: Wrap + add methods?

2021-06-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/28/21 11:53 AM, Paul Backus wrote: On Monday, 28 June 2021 at 15:17:34 UTC, Steven Schveighoffer wrote: I have a situation where I want to wrap a certain type to add a few methods to that type. UFCS is not an option, because the library that will use this type will not import the UFCS

Re: Wrap + add methods?

2021-06-28 Thread Paul Backus via Digitalmars-d-learn
On Monday, 28 June 2021 at 15:17:34 UTC, Steven Schveighoffer wrote: I have a situation where I want to wrap a certain type to add a few methods to that type. UFCS is not an option, because the library that will use this type will not import the UFCS methods. `std.typecons.Proxy` doesn't

Wrap + add methods?

2021-06-28 Thread Steven Schveighoffer via Digitalmars-d-learn
I have a situation where I want to wrap a certain type to add a few methods to that type. UFCS is not an option, because the library that will use this type will not import the UFCS methods. `std.typecons.Proxy` doesn't seem to wrap static methods, and besides, I want to return wrappers if