| 1157 | } |
| 1158 | |
| 1159 | void swap(basic_string& other) |
| 1160 | noexcept(allocator_traits<allocator_type>::propagate_on_container_swap::value || |
| 1161 | allocator_traits<allocator_type>::is_always_equal::value) |
| 1162 | { |
| 1163 | std::swap(data_, other.data_); |
| 1164 | std::swap(size_, other.size_); |
| 1165 | std::swap(capacity_, other.capacity_); |
| 1166 | } |
| 1167 | |
| 1168 | /** |
| 1169 | * 21.4.7, string operations: |