How to cast `shared` away reliably
Nick Treleaven
nick at geany.org
Wed Feb 11 11:26:55 UTC 2026
On Tuesday, 10 February 2026 at 22:56:43 UTC, H. S. Teoh wrote:
> 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.
There is also `Unshared`:
https://dlang.org/phobos/std_traits.html#Unshared
It only strips head shared though.
More information about the Digitalmars-d
mailing list