More bugs...

Artur Skawina art.08.09 at gmail.com
Wed May 2 03:54:58 PDT 2012


On 05/02/12 04:11, Mehrdad wrote:
> More problems... similar, but this time related to templates.
> 
>  struct Filter(R) { this(R) { } }
>  template filter(R) { alias Filter!(R).__ctor filter; }
>  void main() { filter([1, 2, 3]); }
> 
> Error: template linq.filter(R) is not a function template
> 
> 
> Why?

Because it isn't? Where would 'R' come from in your example?...

   auto filter(R)(R r) { return Filter!R(r); }


artur


More information about the Digitalmars-d mailing list