Re: template error instantiating

2012-11-18 Thread Timon Gehr
On 11/18/2012 09:19 AM, Maxim Fomin wrote: On Saturday, 17 November 2012 at 23:28:21 UTC, Timon Gehr wrote: On 11/18/2012 12:14 AM, Manfred Nowak wrote: Maxim Fomin wrote: related to the issue? ... I can see that the definition is ambiguous. And if the coder didnt't realize the ambiguousnes

Re: template error instantiating

2012-11-18 Thread David Nadlinger
On Sunday, 18 November 2012 at 10:19:47 UTC, Manfred Nowak wrote: I will be quiet on this, because non formal specifications tend to have ambiguities and I believe that the ambiguity I see escapes the intended scope; but I am not willing to check for this---and it is fruitless to explain such cas

Re: template error instantiating

2012-11-18 Thread Manfred Nowak
Maxim Fomin wrote: > How this is related I will be quiet on this, because non formal specifications tend to have ambiguities and I believe that the ambiguity I see escapes the intended scope; but I am not willing to check for this---and it is fruitless to explain such cases. -manfred

Re: template error instantiating

2012-11-18 Thread Maxim Fomin
On Saturday, 17 November 2012 at 23:28:21 UTC, Timon Gehr wrote: On 11/18/2012 12:14 AM, Manfred Nowak wrote: Maxim Fomin wrote: related to the issue? ... I can see that the definition is ambiguous. And if the coder didnt't realize the ambiguousness as you do ... -manfred The code give

Re: template error instantiating

2012-11-18 Thread Maxim Fomin
On Saturday, 17 November 2012 at 23:14:56 UTC, Manfred Nowak wrote: Maxim Fomin wrote: related to the issue? ... I can see that the definition is ambiguous. And if the coder didnt't realize the ambiguousness as you do ... -manfred There is compilation error when instantiating class templat

Re: template error instantiating

2012-11-17 Thread Manfred Nowak
Timon Gehr wrote: > The code given in the original post is valid D code. Yes, it is. But I see an ambiguity in the specs for this valid D code. -manfred

Re: template error instantiating

2012-11-17 Thread Timon Gehr
On 11/18/2012 12:14 AM, Manfred Nowak wrote: Maxim Fomin wrote: related to the issue? ... I can see that the definition is ambiguous. And if the coder didnt't realize the ambiguousness as you do ... -manfred The code given in the original post is valid D code.

Re: template error instantiating

2012-11-17 Thread Manfred Nowak
Maxim Fomin wrote: > related to the issue? ... I can see that the definition is ambiguous. And if the coder didnt't realize the ambiguousness as you do ... -manfred

Re: template error instantiating

2012-11-17 Thread Timon Gehr
On 11/17/2012 07:28 PM, ref2401 wrote: I get "template instance main.MyClass!(int) error instantiating" in the following case: public class MyClass(TStuff) { public void foo(TStuff item) {} public void foo(TRange)(TRange items) if (isInputRange!TRange && is(ElementType!TRang

Re: template error instantiating

2012-11-17 Thread David Nadlinger
On Saturday, 17 November 2012 at 18:28:10 UTC, ref2401 wrote: I get "template instance main.MyClass!(int) error instantiating" in the following case: public class MyClass(TStuff) { public void foo(TStuff item) {} public void foo(TRange)(TRange items) if (isInput

Re: template error instantiating

2012-11-17 Thread Maxim Fomin
On Saturday, 17 November 2012 at 20:44:05 UTC, Manfred Nowak wrote: Maxim Fomin wrote: solves compilation errors From the docs: | If a template has exactly one member in it, and the name of | that member is the same as the template name, that member | is assumed to be referred to in a templat

Re: template error instantiating

2012-11-17 Thread Manfred Nowak
Maxim Fomin wrote: > solves compilation errors >From the docs: | If a template has exactly one member in it, and the name of | that member is the same as the template name, that member | is assumed to be referred to in a template instantiation It seems that the problem is located in this definit

Re: template error instantiating

2012-11-17 Thread Maxim Fomin
On Saturday, 17 November 2012 at 18:28:10 UTC, ref2401 wrote: I get "template instance main.MyClass!(int) error instantiating" in the following case: public class MyClass(TStuff) { public void foo(TStuff item) {} public void foo(TRange)(TRange items) if (isInput

template error instantiating

2012-11-17 Thread ref2401
I get "template instance main.MyClass!(int) error instantiating" in the following case: public class MyClass(TStuff) { public void foo(TStuff item) {} public void foo(TRange)(TRange items) if (isInputRange!TRange && is(ElementType!TRange == TStuff)) {} }