Re: How to say to compiler that I want to inherit final template bethod of base interface into derived class

2014-07-20 Thread anonymous via Digitalmars-d-learn
import std.stdio; interface IBase { template getStr(string fieldName) { final string getStr() { return "George"; } } string getStr(string fieldName); } class Derive

How to say to compiler that I want to inherit final template bethod of base interface into derived class

2014-07-20 Thread Uranuz via Digitalmars-d-learn
The question is in the header: How to say to compiler that I want to inherit final template bethod of base interface into derived class? I have the following example. I know that it is maybe overcomplicated but still I need this feature in my code. import std.stdio; interface IBase {

Re: get os thread handles

2014-07-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, 20 July 2014 at 10:03:47 UTC, Sean Campbell wrote: On Sunday, 20 July 2014 at 09:53:52 UTC, Jonathan M Davis wrote: On Sunday, 20 July 2014 at 09:34:46 UTC, Sean Campbell wrote: How do i get an os thread handle from a thread object. or are d thread not wrapped os threads. They do w

Re: get os thread handles

2014-07-20 Thread Sean Campbell via Digitalmars-d-learn
On Sunday, 20 July 2014 at 09:53:52 UTC, Jonathan M Davis wrote: On Sunday, 20 July 2014 at 09:34:46 UTC, Sean Campbell wrote: How do i get an os thread handle from a thread object. or are d thread not wrapped os threads. They do wrap OS threads, but they encapsulate them in a cross-platform

Re: get os thread handles

2014-07-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, 20 July 2014 at 09:34:46 UTC, Sean Campbell wrote: How do i get an os thread handle from a thread object. or are d thread not wrapped os threads. They do wrap OS threads, but they encapsulate them in a cross-platform manner, and looking over Thread, it doesn't look like anything al

get os thread handles

2014-07-20 Thread Sean Campbell via Digitalmars-d-learn
How do i get an os thread handle from a thread object. or are d thread not wrapped os threads.

Re: shared and nonshared dtor

2014-07-20 Thread Vlad Levenfeld via Digitalmars-d-learn
On Sunday, 20 July 2014 at 08:29:55 UTC, Jonathan M Davis wrote: What you will probably need to do is to not try and use the same type as both shared and non-shared if it has a destructor. Unfortunately this option would require an unrealistic lot of refactoring for me. I'm basically using thi

Re: shared and nonshared dtor

2014-07-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, 20 July 2014 at 02:57:44 UTC, Vlad Levenfeld wrote: I have a Resource struct that is supposed to free some memory when it gets destroyed. Unfortunately, I can't define a destructor. If I do, the compiler complains that it can't destroy the shared versions. If I define a shared destru