From 754fae97b7e3f872c73c08659a17102e16551221 Mon Sep 17 00:00:00 2001
From: Martin Nolte <mnolte@dune-project.org>
Date: Thu, 26 Feb 2009 15:25:57 +0000
Subject: [PATCH] always use <typetraits> before <tr1/typetraits>.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

fixes a problem with gcc-4.3, where <tr1/typetraits> and <typetraits> are present:
/usr/people/nolte/numerics/dune/dune-common/dune/common/typetraits.hh:274: error: ‘std::enable_if’ has not been declared

[[Imported from SVN: r5453]]
---
 common/typetraits.hh | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/common/typetraits.hh b/common/typetraits.hh
index 7ad8498b1..8a31705d7 100644
--- a/common/typetraits.hh
+++ b/common/typetraits.hh
@@ -3,10 +3,10 @@
 #ifndef DUNE_TYPETRAITS_HH
 #define DUNE_TYPETRAITS_HH
 
-#ifdef HAVE_TR1_TYPE_TRAITS
-#include <tr1/type_traits>
-#elif defined HAVE_TYPE_TRAITS
+#if defined HAVE_TYPE_TRAITS
 #include <type_traits>
+#elif defined HAVE_TR1_TYPE_TRAITS
+#include <tr1/type_traits>
 #endif
 
 #include <dune/common/deprecated.hh>
@@ -157,12 +157,11 @@ namespace Dune
     typedef volatile typename ConstantVolatileTraits<T>::UnqualifiedType Type;
   };
 
-#ifdef HAVE_TR1_TYPE_TRAITS
-  using std::tr1::remove_const;
-#elif defined HAVE_TYPE_TRAITS
+#if defined HAVE_TYPE_TRAITS
   using std::remove_const;
+#elif defined HAVE_TR1_TYPE_TRAITS
+  using std::tr1::remove_const;
 #else
-
   /**
    * @brief Removes a const qualifier while preserving others.
    */
@@ -303,10 +302,10 @@ namespace Dune
     : public EnableIf<IsInteroperable<T1,T2>::value, Type>
   {};
 
-#ifdef HAVE_TR1_TYPE_TRAITS
-  using std::tr1::is_same;
-#elif defined HAVE_TYPE_TRAITS
+#if defined HAVE_TYPE_TRAITS
   using std::is_same;
+#elif defined HAVE_TR1_TYPE_TRAITS
+  using std::tr1::is_same;
 #else
   /**
    * @brief Compile time test for testing whether
-- 
GitLab