346 constexpr
ERRCODE DONT_EXCHANGE_DELETED(
347 "Can't exchange deleted elements of lists");
356 if (!(other_it->list))
363 if ((list->
empty ()) ||
364 (other_it->list->
empty ()) || (current == other_it->current))
369 if (!current || !other_it->current)
370 DONT_EXCHANGE_DELETED.error (
"CLIST_ITERATOR.exchange",
ABORT,
nullptr);
377 if ((next == other_it->current) ||
378 (other_it->next == current)) {
380 if ((next == other_it->current) &&
381 (other_it->next == current)) {
382 prev = next = current;
383 other_it->prev = other_it->next = other_it->current;
388 if (other_it->next == current) {
389 other_it->prev->next = current;
390 other_it->current->next = next;
391 current->next = other_it->current;
392 other_it->next = other_it->current;
396 prev->next = other_it->current;
397 current->next = other_it->next;
398 other_it->current->next = current;
400 other_it->prev = other_it->current;
405 prev->next = other_it->current;
406 current->next = other_it->next;
407 other_it->prev->next = current;
408 other_it->current->next = next;
414 if (list->last == current)
415 list->last = other_it->current;
416 if (other_it->list->last == other_it->current)
417 other_it->list->last = current;