Очевидно, я упустил из виду, что край 'начала' равен голове.
Это полностью фиксированный код:
// Purpose: removes a section of a lists
// Parameters: start pointer to the begining of the section to remove.
// end pointer to the end of the section to remove.
// Preconditions: start and end are pointers to nodes in this list.
// start precedes end in this list.
// Postconditions: elements between start and end (inclusive) are removed
// from the list.
template<typename T>
void LinkedList<T>::clip(LLNode<T>* start, LLNode<T>* stop)
{
LLNode<T>* walker = m_head;
LLNode<T>* deleter;
LLNode<T>* lastNodeOnFront;
if(m_head == start)
{
lastNodeOnFront = m_head;
}
while(walker != start)
{
lastNodeOnFront = walker;
walker = walker -> m_next;
}
std::cout << *this;
if(stop == m_back || stop == NULL)
{
lastNodeOnFront -> m_next = NULL;
}
else
{
lastNodeOnFront -> m_next = stop -> m_next;
}
std::cout << "before delete\n" << *this;
walker = start;
while(walker != lastNodeOnFront -> m_next)
{
deleter = walker;
walker = walker -> m_next;
delete deleter;
m_size--;
}
return;
}
Спасибо Аконкагуа за помощь!