ArrayTag.opBinary

Does the same job opOpAssign does, but creates a new instance of typeof(this) with the same name of the tag and returns it.

class ArrayTag(T, NBT_TYPE _type)
@safe
typeof(this)
opBinary
(
string op : "~"
G
)
()
if (
is(G == T) ||
is(G == T[])
)

Examples

auto array = new IntArray([1, 2, 3]);
assert(array ~ [2, 1] == [1, 2, 3, 2, 1] && array == [1, 2, 3]);

Meta