304 constexpr
ERRCODE DONT_EXCHANGE_DELETED(
305 "Can't exchange deleted elements of lists");
314 if (!(other_it->list))
321 if ((list->
empty ()) ||
322 (other_it->list->
empty ()) || (current == other_it->current))
327 if (!current || !other_it->current)
328 DONT_EXCHANGE_DELETED.error (
"ELIST2_ITERATOR.exchange",
ABORT,
nullptr);
335 if ((next == other_it->current) ||
336 (other_it->next == current)) {
338 if ((next == other_it->current) &&
339 (other_it->next == current)) {
340 prev = next = current;
341 other_it->prev = other_it->next = other_it->current;
346 if (other_it->next == current) {
347 other_it->prev->next = current;
348 other_it->current->next = next;
349 other_it->current->prev = current;
350 current->next = other_it->current;
351 current->prev = other_it->prev;
352 next->prev = other_it->current;
354 other_it->next = other_it->current;
358 prev->next = other_it->current;
359 current->next = other_it->next;
360 current->prev = other_it->current;
361 other_it->current->next = current;
362 other_it->current->prev = prev;
363 other_it->next->prev = current;
366 other_it->prev = other_it->current;
371 prev->next = other_it->current;
372 current->next = other_it->next;
373 current->prev = other_it->prev;
374 next->prev = other_it->current;
375 other_it->prev->next = current;
376 other_it->current->next = next;
377 other_it->current->prev = prev;
378 other_it->next->prev = current;
384 if (list->last == current)
385 list->last = other_it->current;
386 if (other_it->list->last == other_it->current)
387 other_it->list->last = current;
389 if (current == cycle_pt)