Re: Forwarding Uncopyable Static Array Elements

2017-09-17 Thread Nordlöw via Digitalmars-d-learn
On Sunday, 17 September 2017 at 13:00:04 UTC, Nordlöw wrote: 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

Forwarding Uncopyable Static Array Elements

2017-09-17 Thread Nordlöw via Digitalmars-d-learn
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

Re: Forwarding Uncopyable Static Array Elements

2017-09-17 Thread Nordlöw via Digitalmars-d-learn
On Sunday, 17 September 2017 at 13:00:04 UTC, Nordlöw wrote: How can ... be extended to support uncopyable element types? That is, when `T` is uncopyable.