--- class/LKV/List.h 3 Nov 2004 06:57:51 -0000 1.1 +++ class/LKV/List.h 20 Feb 2006 11:08:10 -0000 @@ -12,7 +12,7 @@ #include "AllocBuf.h" -class ostream; +#include "Bstream.h" template class List; @@ -35,13 +35,13 @@ public: ListItem( void ) : T() #ifdef DEBUG , next((ListItem *)0), prev((ListItem *)0) -#endif DEBUG +#endif /* DEBUG */ { }; ListItem( const T & val ) : T(val) #ifdef DEBUG , next((ListItem *)0), prev((ListItem *)0) -#endif DEBUG +#endif /* DEBUG */ { }; ListItem * get_next(void) const { @@ -59,6 +59,9 @@ LAZYOPS(template ,ListItem) template +BIstream & operator>> (BIstream & in, List & list); + +template class List { protected: @@ -239,7 +242,7 @@ public: return last; }; - friend BIstream & operator>> (BIstream & in, List & list); + friend BIstream & operator>><> (BIstream & in, List & list); }; template @@ -260,7 +263,7 @@ void List::clear(void) { template -ostream & operator<< (ostream & o, const List & l) { +std::ostream & operator<< (std::ostream & o, const List & l) { o << "List with " << l.length() << " elements:\n"; ListItem * li = l.get_head(); int i = 1; @@ -306,4 +309,4 @@ BOstream & operator<< (BOstream & o, con } -#endif List_h +#endif /* List_h */