On 05/24/2015 09:14 PM, tcak wrote:
Line 243: auto fileResourceList = new shared FileResourceList( 2
);
main.d(243): Error: class main.FileResourceList(T) if (is(T :
FileResource)) is used as a type
struct and class templates do not have automatic type deduction;
function templates do.
On Monday, 25 May 2015 at 04:15:00 UTC, tcak wrote:
main.d(243): Error: class main.FileResourceList(T) if (is(T :
FileResource)) is used as a type
The error message is not indicating directly this, though
logically it is still correct.
Compiler means template is used as a type which is an
On Monday, May 25, 2015 03:42:22 tcak via Digitalmars-d-learn wrote:
On Monday, 25 May 2015 at 03:35:22 UTC, Jonathan M Davis wrote:
On Monday, May 25, 2015 03:19:29 tcak via Digitalmars-d-learn
wrote:
Is there any syntax for something like that:
class Resource(T) if( is(T:
On Monday, May 25, 2015 03:19:29 tcak via Digitalmars-d-learn wrote:
Is there any syntax for something like that:
class Resource(T) if( is(T: FileResource) ){
}
I tried it as above, but it is not accepted. Maybe I am following
a wrong syntax.
I tried
class Resource(T: FileResource){
}
On Monday, 25 May 2015 at 03:35:22 UTC, Jonathan M Davis wrote:
On Monday, May 25, 2015 03:19:29 tcak via Digitalmars-d-learn
wrote:
Is there any syntax for something like that:
class Resource(T) if( is(T: FileResource) ){
}
I tried it as above, but it is not accepted. Maybe I am
following
On Monday, 25 May 2015 at 04:07:06 UTC, Jonathan M Davis wrote:
On Monday, May 25, 2015 03:42:22 tcak via Digitalmars-d-learn
wrote:
Well, if I do not check the line number of error, this happens.
It was giving error on the line of creating a new instance.
Line 243: auto fileResourceList =
Is there any syntax for something like that:
class Resource(T) if( is(T: FileResource) ){
}
I tried it as above, but it is not accepted. Maybe I am following
a wrong syntax.
I tried
class Resource(T: FileResource){
}
But it is not accepted as well.