https://issues.dlang.org/show_bug.cgi?id=5040
Maksim Zholudev <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Hardware|x86 |All OS|Windows |All Severity|normal |enhancement --- Comment #1 from Maksim Zholudev <[email protected]> --- The same can be done with string mixin: -------------------- T opIndexOpAssign(string op)(T value, int index) { return mixin("contents " ~ op ~ "= value"); } -------------------- Anyway, the possibility to call operator as function (regardless whether it is defined explicitly or not) for both built-in and user-defined types could make this part of D more consistent. --
