Why doesn't symbol wheelbarrowing work with function templates?
TommiT
tommitissari at hotmail.com
Thu Jun 13 03:23:51 PDT 2013
On Thursday, 13 June 2013 at 10:16:40 UTC, Peter Alexander wrote:
> On Thursday, 13 June 2013 at 09:53:54 UTC, TommiT wrote:
>> 1. alias main.bar conflicts with alias main.bar
>
> This is why: they conflict.
>
> If it worked, what would you expect bar!string() return?
both bar templates take a regular argument as well as a template
argument, so bar!string() would be an error saying something like
"no template 'bar' matches the function call". But if you'd call
bar!string(int.init), then I'd expect it to return 42, and with
bar!string(char.init), I'd expect 3.
More information about the Digitalmars-d
mailing list