Re: How do you get T from shared(T) ?

2014-10-01 Thread Marco Leise via Digitalmars-d-learn
Am Tue, 30 Sep 2014 14:48:03 + schrieb John Colvin john.loughran.col...@gmail.com: On Sunday, 28 September 2014 at 09:11:07 UTC, Marco Leise wrote: For head-unshared there is `static if (is(T U : shared U))`. But how do you get the unshared type for anything from `shared void*` to

Re: How do you get T from shared(T) ?

2014-09-30 Thread John Colvin via Digitalmars-d-learn
On Sunday, 28 September 2014 at 09:11:07 UTC, Marco Leise wrote: For head-unshared there is `static if (is(T U : shared U))`. But how do you get the unshared type for anything from `shared void*` to `shared uint` ? template UnShared(T, bool removeAll = false) { static if(is(T : shared U,

How do you get T from shared(T) ?

2014-09-28 Thread Marco Leise via Digitalmars-d-learn
For head-unshared there is `static if (is(T U : shared U))`. But how do you get the unshared type for anything from `shared void*` to `shared uint` ? -- Marco

Re: How do you get T from shared(T) ?

2014-09-28 Thread tcak via Digitalmars-d-learn
On Sunday, 28 September 2014 at 09:11:07 UTC, Marco Leise wrote: For head-unshared there is `static if (is(T U : shared U))`. But how do you get the unshared type for anything from `shared void*` to `shared uint` ? shared int a; int b = cast()a;

Re: How do you get T from shared(T) ?

2014-09-28 Thread Marco Leise via Digitalmars-d-learn
Am Sun, 28 Sep 2014 14:07:22 + schrieb tcak t...@gmail.com: On Sunday, 28 September 2014 at 09:11:07 UTC, Marco Leise wrote: For head-unshared there is `static if (is(T U : shared U))`. But how do you get the unshared type for anything from `shared void*` to `shared uint` ? shared