On Sunday, July 22, 2012 17:40:36 Ali Çehreli wrote:
> I can't see why the following limitation:
> 
> class C
> {
>      void foo(alias Func)()
>      {}
> }
> 
> void main()
> {
>      auto c = new C();
>      c.foo!(x => x)();  // <-- Compilation error
> }
> 
> Error: template instance foo!(__lambda2) cannot use local
> '__lambda2(__T1)' as parameter to non-global template foo(alias Func)
> 
> Is this a bug?

I'd say that it's a bug . If it's not, it definitely should  be an enhancement.

- Jonathan M Davis

Reply via email to