save

Implements the range interface primitive save for built-in arrays. Due to the fact that nonmember functions can be called with the first argument using the dot notation, array.save is equivalent to save(array). The function does not duplicate the content of the array, it simply returns its argument.

@property @safe pure nothrow @nogc
inout(T)[]
save
(
T
)
(
return scope inout(T)[] a
)

Examples

auto a = [ 1, 2, 3 ];
auto b = a.save;
assert(b is a);

Meta

Suggestion Box / Bug Report