From e4876fac5028d8714aa034d4a56c65fa97e23fa2 Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Mon, 15 Feb 2016 19:12:02 +0100 Subject: [PATCH] Use standard type traits --- dune/fufem/assemblers/localassembler.hh | 4 +++- dune/fufem/assemblers/localoperatorassembler.hh | 4 +++- dune/fufem/python/common.hh | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dune/fufem/assemblers/localassembler.hh b/dune/fufem/assemblers/localassembler.hh index 05713686..3e0a1dde 100644 --- a/dune/fufem/assemblers/localassembler.hh +++ b/dune/fufem/assemblers/localassembler.hh @@ -3,6 +3,8 @@ #ifndef LOCAL_ASSEMBLER_HH #define LOCAL_ASSEMBLER_HH +#include <type_traits> + #include <dune/common/fmatrix.hh> #include <dune/istl/matrix.hh> @@ -71,7 +73,7 @@ class LocalAssembler */ 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 &tFE == reinterpret_cast<const TrialLocalFE*>(&aFE); } diff --git a/dune/fufem/assemblers/localoperatorassembler.hh b/dune/fufem/assemblers/localoperatorassembler.hh index 993d63e6..28c2383c 100644 --- a/dune/fufem/assemblers/localoperatorassembler.hh +++ b/dune/fufem/assemblers/localoperatorassembler.hh @@ -3,6 +3,8 @@ #ifndef LOCAL_OPERATOR_ASSEMBLER_HH #define LOCAL_OPERATOR_ASSEMBLER_HH +#include <type_traits> + #include <dune/common/fmatrix.hh> #include <dune/istl/matrix.hh> @@ -71,7 +73,7 @@ class LocalOperatorAssembler */ 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 &tFE == reinterpret_cast<const TrialLocalFE*>(&aFE); } diff --git a/dune/fufem/python/common.hh b/dune/fufem/python/common.hh index 9f2ac894..1c1ffe9a 100644 --- a/dune/fufem/python/common.hh +++ b/dune/fufem/python/common.hh @@ -11,6 +11,7 @@ #include <string> #include <sstream> +#include <type_traits> #include <dune/common/exceptions.hh> -- GitLab