`with (TemplateInstance):` shoild work
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Aug 21 19:19:13 UTC 2020
On 8/21/20 2:49 AM, Mathias LANG wrote:
> On Friday, 21 August 2020 at 05:10:14 UTC, Andrei Alexandrescu wrote:
>>
>> with (x!()):
>>
>> void main() {
>> 42.fun();
>> }
>>
>> Once that is possible, you get to inject UFCS symbols into a module
>> with ease.
>
> Would the following suit your needs ?
>
> ```
> template x() {
> void fun(int) {}
> }
>
> mixin x;
>
> void main() {
> 42.fun();
> }
> ```
Ah, nice. Thanks!
More information about the Digitalmars-d
mailing list