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 |