On Monday, 29 September 2014 at 10:49:53 UTC, Andrei Alexandrescu wrote:
auto setExtension(MemoryManagementPolicy mmp = gc, R1, R2)(R1 path, R2 ext)
if (...)
{
    static if (mmp == gc) alias S = string;
    else alias S = RCString;
    S result;
    ...
    return result;
}

Is this practically feasible without blowing up Phobos several times in size and complexity?

And I'm not sure adding a template parameter to every function is going to work well, what with all the existing template parameters - especially the optional ones.

Reply via email to