From 9765928d461305451eb6199a1a9417e09549dee9 Mon Sep 17 00:00:00 2001 From: tgdwyer Date: Wed, 22 Feb 2006 06:31:01 +0000 Subject: [PATCH] Fixed template warning. --- src/removeoverlap/pairingheap/PairingHeap.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/removeoverlap/pairingheap/PairingHeap.h b/src/removeoverlap/pairingheap/PairingHeap.h index f8c3abf35..52941873b 100644 --- a/src/removeoverlap/pairingheap/PairingHeap.h +++ b/src/removeoverlap/pairingheap/PairingHeap.h @@ -38,23 +38,26 @@ // Node and forward declaration because g++ does // not understand nested classes. -template +template class PairingHeap; +template +std::ostream& operator<< (std::ostream &os,const PairingHeap &b); + template class PairNode { - template - friend std::ostream& operator <<(std::ostream &os,const PairingHeap &b); - + friend std::ostream& operator<< (std::ostream &os,const PairingHeap &b); T element; PairNode *leftChild; PairNode *nextSibling; PairNode *prev; - PairNode( const T & theElement ) : element( theElement ), - leftChild(NULL), nextSibling(NULL), prev(NULL) { } - friend class PairingHeap; + PairNode( const T & theElement ) : + element( theElement ), + leftChild(NULL), nextSibling(NULL), prev(NULL) + { } + friend class PairingHeap; }; template @@ -67,8 +70,7 @@ public: template class PairingHeap { - template - friend std::ostream& operator <<(std::ostream &os,const PairingHeap &b); + friend std::ostream& operator<< (std::ostream &os,const PairingHeap &b); public: PairingHeap( bool (*lessThan)(T const &lhs, T const &rhs) ); PairingHeap( const PairingHeap & rhs ); -- 2.30.2