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

Reply via email to