From 2dba85eb6c2379162cc196275d3c3b5a0d901c5a Mon Sep 17 00:00:00 2001
From: Tishampati Dhar <devnull@localhost>
Date: Sun, 11 Jul 2010 16:01:06 +0930
Subject: [PATCH] BUG: Added MSVC 2010 specific code switches. MSVC 2010 does
 not compile with these lines included

---
 Utilities/ITK/Code/Common/itk_hash_map.h  | 4 ++++
 Utilities/ITK/Code/Common/itk_hashtable.h | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/Utilities/ITK/Code/Common/itk_hash_map.h b/Utilities/ITK/Code/Common/itk_hash_map.h
index 9e37f4837b..9a1712fe45 100644
--- a/Utilities/ITK/Code/Common/itk_hash_map.h
+++ b/Utilities/ITK/Code/Common/itk_hash_map.h
@@ -185,7 +185,9 @@ public:
   bool empty() const { return rep.empty(); }
   void swap(self& hs) { rep.swap(hs.rep); }
 
+#if _MSC_VER != 1600
   friend bool operator==ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT(self)(const self &, const self &);
+#endif
 
   iterator begin() { return rep.begin(); }
   iterator end() { return rep.end(); }
@@ -289,7 +291,9 @@ public:
   bool empty() const { return rep.empty(); }
   void swap(self& hs) { rep.swap(hs.rep); }
 
+#if _MSC_VER != 1600
   friend bool operator==ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT(self)(const self &, const self &);
+#endif
 
   iterator begin() { return rep.begin(); }
   iterator end() { return rep.end(); }
diff --git a/Utilities/ITK/Code/Common/itk_hashtable.h b/Utilities/ITK/Code/Common/itk_hashtable.h
index e166f493f5..d07c3b3368 100644
--- a/Utilities/ITK/Code/Common/itk_hashtable.h
+++ b/Utilities/ITK/Code/Common/itk_hashtable.h
@@ -471,7 +471,9 @@ public:
 
   const_iterator end() const { return const_iterator((node*)0, this); }
 
+#if _MSC_VER != 1600
   friend bool operator==ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT(self)(const self&,const self&);
+#endif
 
 public:
 
@@ -1144,14 +1146,17 @@ void hashtable_base<Value, Alloc>::copy_from(const hashtable_base<Value, Alloc>&
 
 // A few compatability fixes.  Placed here for automatic include in
 // both the hash_set and the hash_map sources.
+
 # if defined (_MSC_VER) || defined(__BORLANDC__) || ((defined(__ICC)||defined(__ECC)) && defined(linux))
 namespace std
 {
+#if _MSC_VER != 1600
 template <class T>
 struct identity : public std::unary_function<T, T> {
 public:
   const T& operator()(const T& x) const { return x; }
 };
+#endif
 }
 
 template <class _Pair>
-- 
GitLab