'final' function implementations in interface definition

Steve Schveighoffer schveiguy at yahoo.com
Sun Jun 7 19:20:16 PDT 2009


On Sun, 07 Jun 2009 19:52:05 -0400, HOSOKAWA Kenchi wrote:

> Steve Schveighoffer Wrote:
> 
> 
>> f_twice can be a template:
>> 
>> void f_twice()(int i) { f(i); f(i); }
>> 
>> It's pretty much exactly what you want.  It should even work without
>> explicit instantiation.
>> 
>> -Steve
> 
> I have tried to replace final function in the interface with your code.
> finally I got following message. Error: function I.f_twice!().f_twice
> template member function not allowed in interface I

I could have sworn I'd seen this or written something like this in 
tango's log package...

It probably would be a good solution to this problem...

-Steve



More information about the Digitalmars-d mailing list