Use case: eliminate hidden allocations in buildPath

Manu turkeyman at gmail.com
Wed Dec 4 19:56:26 PST 2013


On 5 December 2013 13:14, Michel Fortin <michel.fortin at michelf.ca> wrote:

> On 2013-12-05 02:24:02 +0000, Manu <turkeyman at gmail.com> said:
>
>  Allocator as the first argument? This is so you can use UFCS on the
>> allocator to make the call?
>>
>
> Haha, no. That's because buildPath's arguments are (const(C[])[] paths...)
> with a "..." at the end. Can we put an argument after the variadic
> argument? I didn't check, but I though it was impossible... thus the
> allocator as the first argument.


Oh yeah! :P
I was thinking in a more general sense, as a principle to be applied across
phobos, not just for this one function.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131205/d4b6cd7b/attachment.html>


More information about the Digitalmars-d mailing list