Code

introduce orthogonal template declaration, fixes compiler warnings
authorrwst <rwst@users.sourceforge.net>
Tue, 21 Feb 2006 15:25:19 +0000 (15:25 +0000)
committerrwst <rwst@users.sourceforge.net>
Tue, 21 Feb 2006 15:25:19 +0000 (15:25 +0000)
src/removeoverlap/pairingheap/PairingHeap.h

index 1c01601418194409ebcdcb9c4e5ba1afd787e831..f8c3abf3529411a7df1b9121ad58a7427e8036e2 100644 (file)
@@ -44,7 +44,9 @@ class PairingHeap;
 template <class T>
 class PairNode
 {
-       friend std::ostream& operator <<(std::ostream &os,const PairingHeap<T> &b);
+    template <class U> 
+        friend std::ostream& operator <<(std::ostream &os,const PairingHeap<U> &b);
+
        T   element;
        PairNode    *leftChild;
        PairNode    *nextSibling;
@@ -65,7 +67,8 @@ public:
 template <class T>
 class PairingHeap
 {
-       friend std::ostream& operator <<(std::ostream &os,const PairingHeap<T> &b);
+    template <class U>
+       friend std::ostream& operator <<(std::ostream &os,const PairingHeap<U> &b);
 public:
        PairingHeap( bool (*lessThan)(T const &lhs, T const &rhs) );
        PairingHeap( const PairingHeap & rhs );