Forwarding Uncopyable Static Array Elements

Nordlöw per.nordlow at gmail.com
Sun Sep 17 13:00:04 UTC 2017


How can

T[n] asStatic(T, size_t n)(T[n] arr)
{
     import std.traits : isCopyable;
     static if (isCopyable!T)
     {
         return arr;
     }
     else
     {
         static assert(false, "TODO support forwarding of 
uncopyable elements");
     }
}

be extended to support uncopyable element types?


More information about the Digitalmars-d-learn mailing list