Can not override template and nontemplate function

monarch_dodra monarchdodra at gmail.com
Sat Aug 31 23:56:45 PDT 2013


On Saturday, 31 August 2013 at 18:47:02 UTC, Timon Gehr wrote:
> On 08/31/2013 06:39 PM, monarch_dodra wrote:
>>
>>
>> Although arguably, since foo is already in a parameterized 
>> context,
>> *ideally* it should already be infered (but that is not the 
>> case today).
>
> http://d.puremagic.com/issues/show_bug.cgi?id=7511

This is the "first" example. It doesn't work for the second. It 
doesn't go deep enough (non-template function in a non-template 
struct declared in a template-function).

Basically voldermorts.

Real life example:

//----
import std.range;

void main() pure
{
     chain([1], [2]); //not pure.
}
//----


More information about the Digitalmars-d mailing list