class Cursor
{
public:
- Cursor( List<T>& list, Link<T>* pointer = 0 );
+ Cursor( const List<T>& list, Link<T>* pointer = 0 );
+ /** this isn't true, actually, #list# surely isn't const, but I get
+ tired of the warning messages. */
+
Cursor( const Cursor<T>& cursor );
/// return current T
/*
- comparations.
+ comparisons.
*/
-
-
-
-
-
-
-
-
-
#include "compare.hh"
template<class T>
template<class T>
inline
-Cursor<T>::Cursor( List<T>& list, Link<T>* pointer ) :
- list_( list )
+Cursor<T>::Cursor( const List<T>& list, Link<T>* pointer ) :
+ list_((List<T>&) list )
{
if ( list.size() )
pointer_ = pointer ? pointer : list.top_;
- //list.top().pointer_; // ARGH! recursion.
else
pointer_ = pointer;
}