Skip to content
Snippets Groups Projects
Commit e4876fac authored by Elias Pipping's avatar Elias Pipping
Browse files

Use standard type traits

parent f78db2b4
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
#ifndef LOCAL_ASSEMBLER_HH #ifndef LOCAL_ASSEMBLER_HH
#define LOCAL_ASSEMBLER_HH #define LOCAL_ASSEMBLER_HH
#include <type_traits>
#include <dune/common/fmatrix.hh> #include <dune/common/fmatrix.hh>
#include <dune/istl/matrix.hh> #include <dune/istl/matrix.hh>
...@@ -71,7 +73,7 @@ class LocalAssembler ...@@ -71,7 +73,7 @@ class LocalAssembler
*/ */
static bool isSameFE(const TrialLocalFE& tFE, const AnsatzLocalFE& aFE) static bool isSameFE(const TrialLocalFE& tFE, const AnsatzLocalFE& aFE)
{ {
if (not Dune::Conversion<TrialLocalFE, AnsatzLocalFE>::sameType) if (not std::is_same<TrialLocalFE, AnsatzLocalFE>::value)
return false; return false;
return &tFE == reinterpret_cast<const TrialLocalFE*>(&aFE); return &tFE == reinterpret_cast<const TrialLocalFE*>(&aFE);
} }
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
#ifndef LOCAL_OPERATOR_ASSEMBLER_HH #ifndef LOCAL_OPERATOR_ASSEMBLER_HH
#define LOCAL_OPERATOR_ASSEMBLER_HH #define LOCAL_OPERATOR_ASSEMBLER_HH
#include <type_traits>
#include <dune/common/fmatrix.hh> #include <dune/common/fmatrix.hh>
#include <dune/istl/matrix.hh> #include <dune/istl/matrix.hh>
...@@ -71,7 +73,7 @@ class LocalOperatorAssembler ...@@ -71,7 +73,7 @@ class LocalOperatorAssembler
*/ */
static bool isSameFE(const TrialLocalFE& tFE, const AnsatzLocalFE& aFE) static bool isSameFE(const TrialLocalFE& tFE, const AnsatzLocalFE& aFE)
{ {
if (not Dune::Conversion<TrialLocalFE, AnsatzLocalFE>::sameType) if (not std::is_same<TrialLocalFE, AnsatzLocalFE>::value)
return false; return false;
return &tFE == reinterpret_cast<const TrialLocalFE*>(&aFE); return &tFE == reinterpret_cast<const TrialLocalFE*>(&aFE);
} }
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <type_traits>
#include <dune/common/exceptions.hh> #include <dune/common/exceptions.hh>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment