The OpenD Programming Language

TotalContainer.stableInsert

Inserts stuff in an unspecified position in the container. Implementations should choose whichever insertion means is the most advantageous for the container, but document the exact behavior. stuff can be a value convertible to the element type of the container, or a range of values convertible to it.

The stable version guarantees that ranges iterating over the container are never invalidated. Client code that counts on non-invalidating insertion should use stableInsert. Such code would not compile against containers that don't support it.

struct TotalContainer(T)
size_t
stableInsert
(
Stuff
)
(
Stuff stuff
)

Return Value

Type: size_t

The number of elements added.

Complexity: O(m * log(n)), where m is the number of elements in stuff

Meta