From: Daniel Arndt Date: Mon, 30 Jan 2017 13:39:19 +0000 (+0100) Subject: Document why the change was necessary X-Git-Tag: v8.5.0-rc1~189^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7163287bf742ea13ba9dfa6aac9d332a95c7676;p=dealii.git Document why the change was necessary --- diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index 65b8626f0a..73cde3aa4f 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -2916,6 +2916,13 @@ operator * (const SymmetricTensor &t, // (as well as with switched arguments and double<->float). typedef typename ProductType::type product_type; SymmetricTensor tt(t); + // we used to shorten the following by 'tt *= product_type(factor);' + // which requires that a converting constructor + // 'product_type::product_type(const OtherNumber) is defined. + // however, a user-defined constructor is not allowed for aggregates, + // e.g. VectorizedArray. therefore, we work around this issue using a + // copy-assignment operator 'product_type::operator=(const OtherNumber)' + // which we assume to be defined. product_type new_factor; new_factor = factor; tt *= new_factor;