From 49a211317812f4d24cdfc864a0664c667299bdcf Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@dune-project.org>
Date: Thu, 15 Feb 2007 17:04:26 +0000
Subject: [PATCH] introducing is_same as a replacement for SameType

[[Imported from SVN: r4847]]
---
 common/typetraits.hh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/common/typetraits.hh b/common/typetraits.hh
index 2bcb6e79f..9ee52b04d 100644
--- a/common/typetraits.hh
+++ b/common/typetraits.hh
@@ -276,10 +276,34 @@ namespace Dune
     : public EnableIf<IsInteroperable<T1,T2>::value, Type>
   {};
 
+#ifdef HAVE_TR1_TYPE_TRAITS
+  using std::tr1::is_same;
+#else
+  /**
+   * @brief Compile time test for testing whether
+   * two types are the same.
+   */
+  template<typename T1, typename T2>
+  struct is_same
+  {
+    enum {
+      /* @brief Whether T1 is the same type as T2. */
+      value=false
+    };
+  };
+
+
+  template<typename T>
+  struct is_same<T,T>
+  {
+    enum { value=true};
+  };
+#endif
 
   /**
    * @brief Compile time test for testing whether
    * two types are the same.
+   * \deprecated Use is_same instead
    */
   template<typename T1, typename T2>
   struct SameType
-- 
GitLab