From dd6766aca5217bf9fae72ef31a37cce9010622c5 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sat, 12 Sep 2015 00:46:19 -0500 Subject: [PATCH] Bugfix: Remove wrong bugfix This is just a mistake. We should tackle the fundamental problem, namely that we do not have templated operator* for mixed std::complex types available. Explicitly casting to product_type at every occurence of a possible product of another scalar with a complex number type is not just tedious, it is also strictly speaking not correct: The type trait ProductType::type defines the type that results from calling operator* on those types - but neither Left, nor Right, have to be convertible to a ProductType... (The contraction of tensors as we do with operator* is an example) --- cmake/checks/check_03_compiler_bugs.cmake | 15 --------------- include/deal.II/base/config.h.in | 1 - include/deal.II/base/tensor.h | 16 ---------------- 3 files changed, 32 deletions(-) diff --git a/cmake/checks/check_03_compiler_bugs.cmake b/cmake/checks/check_03_compiler_bugs.cmake index a1d8d1cd34..03d63f6ab1 100644 --- a/cmake/checks/check_03_compiler_bugs.cmake +++ b/cmake/checks/check_03_compiler_bugs.cmake @@ -423,18 +423,3 @@ IF(DEAL_II_WITH_CXX11) RESET_CMAKE_REQUIRED() ENDIF() - -# -# GCC 4.8 (and possibly older) have a regression that prevents our "trick" -# to allow multiplication of Tensor objects with std::complex and -# scalars U with different types T and U from working. In this case a -# specialization is needed. See also base/product_type_02.cc and -# base/product_type_03.cc -# -# - Matthias Maier, 2015 -# - -IF( CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND - CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9" ) - SET(DEAL_II_GCC_COMPLEX_CONV_BUG TRUE) -ENDIF() diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index cf7f55f467..72863f63b2 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -70,7 +70,6 @@ #cmakedefine DEAL_II_BIND_NO_CONST_OP_PARENTHESES #cmakedefine DEAL_II_CONSTEXPR_BUG #cmakedefine DEAL_II_ICC_SFINAE_BUG -#cmakedefine DEAL_II_GCC_COMPLEX_CONV_BUG /*********************************************************************** diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 15d2754898..1f75f7a7da 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -1378,22 +1378,6 @@ operator * (const Tensor &t, } -#ifdef DEAL_II_GCC_COMPLEX_CONV_BUG -template -inline -Tensor<1,dim,typename ProductType::type>::type> -operator * (const Tensor<1,dim,Number> &t, - const OtherNumber factor) -{ - typedef typename ProductType::type product_type; - Tensor<1,dim,product_type> tt; - for (unsigned int d=0; d