TotalContainer.insert

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.

  1. size_t insert(Stuff stuff)
    struct TotalContainer(T)
    size_t
    insert
    (
    Stuff
    )
    (
    Stuff stuff
    )
  2. size_t stableInsert(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

Suggestion Box / Bug Report