How to cast `shared` away reliably

H. S. Teoh hsteoh at qfbox.info
Tue Feb 10 22:56:43 UTC 2026


On Tue, Feb 10, 2026 at 10:14:36PM +0100, Arafel via Digitalmars-d wrote:
> So, first of all, a bit of background - I just hit this regression:
> https://github.com/dlang/dmd/issues/22556
> 
> TLDR: I just want / need a reliable way to get exactly `T` from
> `shared (T)`.
[...]

I thought Phobos has an Unqual!T template that does exactly that.

Well OK, it strips away more than just shared, but you should be able to
achieve what you want by looking at how Unqual is implemented.


T

-- 
In a world without fences, who needs Windows and Gates? -- Christian Surchi


More information about the Digitalmars-d mailing list