Expression | Return type | Assertion/note | Complexity | |
pre-/post-condition | ||||
allocator_type | A | compile time | ||
get_- allocator() | A | constant | ||
X() X u; | Preconditions: A meets the Cpp17DefaultConstructible requirements. Postconditions: u.empty() returns true, u.get_allocator() == A() | constant | ||
X(m) | Postconditions: u.empty() returns true, | constant | ||
X u(m); | u.get_allocator() == m | |||
X(t, m) X u(t, m); | Postconditions: u == t, u.get_allocator() == m | linear | ||
X(rv) X u(rv); | Postconditions: u has the same elements as rv had before this
construction; the value of u.get_allocator() is the same as the
value of rv.get_allocator() before this construction. | constant | ||
X(rv, m) X u(rv, m); | Postconditions: u has the same elements, or copies of the elements, that rv had before this construction, u.get_allocator() == m | constant if m == rv.get_allocator(), otherwise linear | ||
a = t | X& | Postconditions: a == t | linear | |
a = rv | X& | Preconditions: If allocator_- traits<allocator_type> ::propagate_on_container_- move_assignment::value is false, T is Cpp17MoveInsertable into X and Cpp17MoveAssignable. | linear | |
a.swap(b) | void | Effects: exchanges the contents of a and b | constant |