293 constexpr
ERRCODE DONT_EXCHANGE_DELETED(
294 "Can't exchange deleted elements of lists");
303 if (!(other_it->list))
310 if ((list->
empty ()) ||
311 (other_it->list->
empty ()) || (current == other_it->current))
316 if (!current || !other_it->current)
317 DONT_EXCHANGE_DELETED.error (
"ELIST_ITERATOR.exchange",
ABORT,
nullptr);
324 if ((next == other_it->current) ||
325 (other_it->next == current)) {
327 if ((next == other_it->current) &&
328 (other_it->next == current)) {
329 prev = next = current;
330 other_it->prev = other_it->next = other_it->current;
335 if (other_it->next == current) {
336 other_it->prev->next = current;
337 other_it->current->next = next;
338 current->next = other_it->current;
339 other_it->next = other_it->current;
343 prev->next = other_it->current;
344 current->next = other_it->next;
345 other_it->current->next = current;
347 other_it->prev = other_it->current;
352 prev->next = other_it->current;
353 current->next = other_it->next;
354 other_it->prev->next = current;
355 other_it->current->next = next;
361 if (list->last == current)
362 list->last = other_it->current;
363 if (other_it->list->last == other_it->current)
364 other_it->list->last = current;