On 09/08/2011 08:31 PM, Timon Gehr wrote:
On 09/08/2011 06:52 PM, Andrej Mitrovic wrote:
On 9/8/11, dsimcha<[email protected]> wrote:
Uh...what's wrong with this at the top of every file:

alias toUTFz!(const(wchar)*) toUTF16z;


Maybe this is wrong:

Error: template instance toUTFz!(const(wchar)*) does not match any
template declaration

Yes, I think it D should be enhanced so that it is possible to partially
apply a template using alias, that would make alias a lot more useful.

For now, this will do:

auto toUTF16z(S)(S str){return toUTFz!(const(wchar)*)(str);}


BTW, why does toUTFz!(const(wchar)*) not work with UFCS? Is that a bug?

Ah, I get it. k, imho toUTFz should be curried. That would make both the alias and UFCS work.

Reply via email to