Eliminating code duplication for static/nonstatic functions

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Sep 19 12:44:21 PDT 2013


On 9/19/13 12:42 PM, Andrej Mitrovic wrote:
> 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.

I'm not sure I understand how that would work.

Andrei




More information about the Digitalmars-d mailing list