Persistent list

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Mon Nov 16 13:47:07 PST 2015


On 11/16/2015 04:18 PM, Jonathan M Davis wrote:
> When you can templatize the function on the type that would otherwise be
> inout, then there really isn't any reason to use inout. But what do you
> do when you're dealing with a member function - especially on a class? I
> don't know of any way to templatize a member function on the type of the
> this pointer/reference, but maybe there's a template feature with which
> I'm not familiar enough. But even if there _is_ such a feature, it won't
> work for virtual functions.

It does. Write one-liners that forward to the template function, as 
shown in http://dpaste.dzfl.pl/52a3013efe34 (search the page for QList). 
-- Andrei


More information about the Digitalmars-d mailing list