From: Matthias Maier Date: Mon, 14 Sep 2015 07:34:03 +0000 (-0500) Subject: Bugfix: Support complex_overloads.h also in C++11 mode X-Git-Tag: v8.4.0-rc2~425^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=257596081d6e539bfd2ca53ac9703ba86accd8bb;p=dealii.git Bugfix: Support complex_overloads.h also in C++11 mode [Wow. This is the first time that I broke something in C++11 mode - I didn't realize that I was still in C++98 mode when testing...] Manually specify all products that shall be available in ProductType - otherwise our overloads cannot be used. --- diff --git a/include/deal.II/base/template_constraints.h b/include/deal.II/base/template_constraints.h index acdc8d3066..bc44e7105e 100644 --- a/include/deal.II/base/template_constraints.h +++ b/include/deal.II/base/template_constraints.h @@ -461,6 +461,13 @@ struct ProductType typedef float type; }; +#endif + +// Annoyingly, there is no std::complex::operator*(U) for scalars U +// other than T (not even in C++11, or C++14). We provide our own overloads +// in base/complex_overloads.h, but in order for them to work, we have to +// manually specify all products we want to allow: + template struct ProductType,std::complex > { @@ -498,7 +505,6 @@ struct ProductType,float> typedef std::complex::type> type; }; -#endif /**