0001 template <typename T> int List<T>::clear() { //清空列表 0002 int oldSize = _size; 0003 while ( 0 < _size ) remove ( header->succ ); //反复删除首节点,直至列表变空 0004 return oldSize; 0005 }