`with (TemplateInstance):` shoild work
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Aug 21 05:10:14 UTC 2020
I just tried this:
template x() {
void fun(int) {}
}
void main() {
with (x!()) {
42.fun();
}
}
It works, and it's a great way to inject UFCS symbols. But at best it
should work with the colon syntax so it applies through the end of
scope/module:
with (x!()):
void main() {
42.fun();
}
Once that is possible, you get to inject UFCS symbols into a module with
ease.
More information about the Digitalmars-d
mailing list