Look how it's used:
// Removes all of the elements from the list __x to *this, inserting
// them immediately after __pos. __x must not be *this. Complexity:
// linear in __x.size().
void
splice_after(iterator __pos, slist& __x)
{ __slist_splice_after(__pos._M_node, &__x._M_head); }
And look how _M_head
is declared:
_Slist_node_base _M_head;
So the __head
parameter is not a real node, it's a node_base
, which means it doesn't contain any data, it's just a pointer to the first element, so it doesn't get "cut off" because it's still in the slist
it's a member of, and it ends up exactly where it started.