0001 template <typename T> //将e紧靠当前节点之前插入于当前节点所属列表(设有哨兵头节点header) 0002 ListNodePosi<T> ListNode<T>::insertAsPred( T const& e ) { 0003 ListNodePosi<T> x = new ListNode( e, pred, this ); //创建新节点 0004 pred->succ = x; pred = x; //设置正向链接 0005 return x; //返回新节点的位置 0006 }