[Issue 12133] Relaxed read-modify-write for shared lvalues

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 11 15:51:05 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12133



--- Comment #5 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2014-02-11 15:51:03 PST ---
(In reply to comment #4)
> Uhh that should teach me to copy-paste, the RHS should simply strip shared, not
> strip all the qualifiers.

Fixed: 

template Unshared(T)
{
         static if (is(T U == shared inout const U)) alias Unshared = inout
const U;
    else static if (is(T U == shared inout       U)) alias Unshared = inout U;
    else static if (is(T U == shared       const U)) alias Unshared = const U;
    else static if (is(T U == shared             U)) alias Unshared = U;
    else                                             alias Unshared = T;
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list