Assign value val to element at position index.
{ auto vec = Vector!(int, 4).build(1, 2, 3, 4, 5); vec[1] = 42; assert(vec == [1, 42, 3, 4, 5]); } { auto vec = Vector!(int, 4).build(1, 2, 3, 4, 5); vec[1 .. $-1] = 42; assert(vec == [1, 42, 42, 42, 5]); }
See Implementation
Assign value val to element at position index.