On Friday, 22 April 2016 at 09:25:32 UTC, Jeff Thompson wrote: > Hello. The following code compiles OK where func creates a > mutable array and main assigns it to an immutable variable: > > [...] Probably this is what you look for http://dlang.org/phobos/std_exception.html#.assumeUnique