Pointer to dlang spec for this alias construct?
Andy Valencia
dont at spam.me
Mon Jun 17 04:32:50 UTC 2024
In the alias:
alias Unshared(T) = T;
alias Unshared(T: shared U, U) = U;
as used in:
cast(Unshared!mytype)value
turns a mytype with shared attribute into one without shared.
I deduce the alias is using some sort of type matching and
decomposition?
I've read through the language spec, and didn't spot this
mechanism. Can somebody tell me what section of the spec covers
this very interesting mechanism?
Thanks in advance,
Andy
More information about the Digitalmars-d-learn
mailing list