Eliminating code duplication for static/nonstatic functions

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Sep 19 12:42:49 PDT 2013


On 9/19/13, Jacob Carlborg <doob at me.com> wrote:
> On 2013-09-19 19:20, Andrej Mitrovic wrote:
>
>> opDispatch comes to mind. You'd only need two of them, one marked static
>> and the other one not.
>
> You cannot overload on "static".

Can't you read the damn OP example? He's using a static if to
introduce static/non-static functions, do the same for opDispatch and
you'll cut down on code.


More information about the Digitalmars-d mailing list