Browse Source

COMP: Remove friend templates and always use template friends (possibly with <>). Needed to work-around Sun CC bug.

Brad King 20 years ago
parent
commit
4fe07aa481
3 changed files with 0 additions and 31 deletions
  1. 0 13
      Source/kwsys/hash_map.hxx.in
  2. 0 12
      Source/kwsys/hash_set.hxx.in
  3. 0 6
      Source/kwsys/hashtable.hxx.in

+ 0 - 13
Source/kwsys/hash_map.hxx.in

@@ -181,15 +181,8 @@ public:
   bool empty() const { return _M_ht.empty(); }
   void swap(hash_map& __hs) { _M_ht.swap(__hs._M_ht); }
 
-#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES
-  template <class _K1, class _T1, class _HF, class _EqK, class _Al>
-  friend bool operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&,
-                          const hash_map<_K1, _T1, _HF, _EqK, _Al>&);
-#else
   friend bool operator==@KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS(const hash_map&,
                                                                  const hash_map&);
-#endif
-
 
   iterator begin() { return _M_ht.begin(); }
   iterator end() { return _M_ht.end(); }
@@ -382,14 +375,8 @@ public:
   bool empty() const { return _M_ht.empty(); }
   void swap(hash_multimap& __hs) { _M_ht.swap(__hs._M_ht); }
 
-#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES
-  template <class _K1, class _T1, class _HF, class _EqK, class _Al>
-  friend bool operator== (const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&,
-                          const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&);
-#else
   friend bool operator==@KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS(const hash_multimap&,
                                                                  const hash_multimap&);
-#endif
 
   iterator begin() { return _M_ht.begin(); }
   iterator end() { return _M_ht.end(); }

+ 0 - 12
Source/kwsys/hash_set.hxx.in

@@ -179,14 +179,8 @@ public:
   bool empty() const { return _M_ht.empty(); }
   void swap(hash_set& __hs) { _M_ht.swap(__hs._M_ht); }
 
-#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES
-  template <class _Val, class _HF, class _EqK, class _Al>
-  friend bool operator== (const hash_set<_Val, _HF, _EqK, _Al>&,
-                          const hash_set<_Val, _HF, _EqK, _Al>&);
-#else
   friend bool operator==@KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS(const hash_set&,
                                                                  const hash_set&);
-#endif
 
   iterator begin() const { return _M_ht.begin(); }
   iterator end() const { return _M_ht.end(); }
@@ -374,14 +368,8 @@ public:
   bool empty() const { return _M_ht.empty(); }
   void swap(hash_multiset& hs) { _M_ht.swap(hs._M_ht); }
 
-#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES
-  template <class _Val, class _HF, class _EqK, class _Al>
-  friend bool operator== (const hash_multiset<_Val, _HF, _EqK, _Al>&,
-                          const hash_multiset<_Val, _HF, _EqK, _Al>&);
-#else
   friend bool operator==@KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS(const hash_multiset&,
                                                                  const hash_multiset&);
-#endif
 
   iterator begin() const { return _M_ht.begin(); }
   iterator end() const { return _M_ht.end(); }

+ 0 - 6
Source/kwsys/hashtable.hxx.in

@@ -426,14 +426,8 @@ public:
 
   const_iterator end() const { return const_iterator(0, this); }
 
-#if @KWSYS_NAMESPACE@_CXX_HAS_MEMBER_TEMPLATES
-  template <class _Vl, class _Ky, class _HF, class _Ex, class _Eq, class _Al>
-  friend bool operator== (const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&,
-                          const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&);
-#else
   friend bool operator==@KWSYS_NAMESPACE@_CXX_NULL_TEMPLATE_ARGS(const hashtable&,
                                                                  const hashtable&);
-#endif
 
 public: