#include <assert.h>
template<class T>
-Cursor<T>
-Cursor<T>::operator ++( int )
+ void
+Cursor<T>::backspace()
{
- Cursor<T> r = *this;
- assert( pointer_ );
- pointer_ = pointer_->next();
- return r;
+ Cursor<T> c(*this);
+ c--;
+ list_.remove( *this );
+}
+
+template<class T>
+ void
+Cursor<T>::del()
+{
+ Cursor<T> c(*this);
+ c++;
+ list_.remove( *this );
+ *this = c;
}
+
+
template<class T>
Cursor<T>
Cursor<T>::operator -=( int j )
return *this;
}
-template<class T>
-Cursor<T>
-Cursor<T>::operator --( int )
-{
- Cursor<T> r = *this;
- assert( pointer_ );
- pointer_ = pointer_->previous();
- return r;
-}
-
template<class T>
Cursor<T>
Cursor<T>::operator +( int i ) const
list_.insert( th, *this );
}
-template<class T>
-inline void
-Cursor<T>::backspace()
-{
- Cursor<T> c(*this);
- c--;
- list_.remove( *this );
-}
-
-template<class T>
-inline void
-Cursor<T>::del()
-{
- Cursor<T> c(*this);
- c++;
- list_.remove( *this );
- *this = c;
-}
-
template<class T>
inline const List<T>&
Cursor<T>::list() const
return ( pointer_ != 0 );
}
+
+template<class T>
+inline Cursor<T>
+Cursor<T>::operator ++( int )
+{
+ Cursor<T> r (*this);
+ assert( pointer_ );
+ pointer_ = pointer_->next();
+ return r;
+}
+
+template<class T>
+inline Cursor<T>
+Cursor<T>::operator --( int )
+{
+ Cursor<T> r (*this);
+ assert( pointer_ );
+ pointer_ = pointer_->previous();
+ return r;
+}
+
#endif