From: Matthias Maier Date: Sat, 16 May 2020 16:59:00 +0000 (-0500) Subject: Workaround: Add additional complex ProductTypeImpl specializations X-Git-Tag: v9.2.0-rc3~7^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cc198cf721e51971657ac92ba1edf30d13370e5;p=dealii.git Workaround: Add additional complex ProductTypeImpl specializations The workaround introduced in 32ecab6 needs an additional variant to deduce the product type of Tensor<..., complex> and complex correctly. Co-authored-by: Daniel Arndt --- diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index 164d3740b3..ea6599ec13 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -81,6 +81,17 @@ namespace internal std::complex::type>>; }; + + template + struct ProductTypeImpl>, + std::complex> + { + using type = + SymmetricTensor::type>>; + }; + template struct ProductTypeImpl, SymmetricTensor> { @@ -90,6 +101,16 @@ namespace internal std::complex::type>>; }; + template + struct ProductTypeImpl, + SymmetricTensor>> + { + using type = + SymmetricTensor::type>>; + }; + /** * A namespace for functions and classes that are internal to how the * SymmetricTensor class (and its associate functions) works. diff --git a/include/deal.II/base/tensor.h b/include/deal.II/base/tensor.h index 12877fa925..61435d45a0 100644 --- a/include/deal.II/base/tensor.h +++ b/include/deal.II/base/tensor.h @@ -796,6 +796,13 @@ namespace internal Tensor::type>>; }; + template + struct ProductTypeImpl>, std::complex> + { + using type = + Tensor::type>>; + }; + template struct ProductTypeImpl, Tensor> { @@ -803,6 +810,13 @@ namespace internal Tensor::type>>; }; + template + struct ProductTypeImpl, Tensor>> + { + using type = + Tensor::type>>; + }; + /** * The structs below are needed to initialize nested Tensor objects. * Also see numbers.h for another specialization.