www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - generic cast(unshared) ?

reply Timothee Cour via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> writes:
How would I cast away shared for a given expression?
I can write it for a specific type but I'd like to have a generic way to do
so.
Also, Unqual doesn't help here.
Jun 28 2015
parent "tcak" <tcak gmail.com> writes:
On Sunday, 28 June 2015 at 23:42:47 UTC, Timothee Cour wrote:
 How would I cast away shared for a given expression?
 I can write it for a specific type but I'd like to have a 
 generic way to do
 so.
 Also, Unqual doesn't help here.
Normally, "cast()" removes "shared" from a type. BUT, sometimes it doesn't work for me, and forces me to type the type of variable again.
Jun 28 2015