Skip to content
Snippets Groups Projects
Commit 754fae97 authored by Martin Nolte's avatar Martin Nolte
Browse files

always use <typetraits> before <tr1/typetraits>.

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]]
parent 718c4330
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment