Skip to content
Snippets Groups Projects
Commit 49a21131 authored by Oliver Sander's avatar Oliver Sander
Browse files

introducing is_same as a replacement for SameType

[[Imported from SVN: r4847]]
parent b241e75a
No related branches found
No related tags found
No related merge requests found
...@@ -276,10 +276,34 @@ namespace Dune ...@@ -276,10 +276,34 @@ namespace Dune
: public EnableIf<IsInteroperable<T1,T2>::value, Type> : 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 * @brief Compile time test for testing whether
* two types are the same. * two types are the same.
* \deprecated Use is_same instead
*/ */
template<typename T1, typename T2> template<typename T1, typename T2>
struct SameType struct SameType
......
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