From: Matthias Maier Date: Sat, 12 Sep 2015 06:41:15 +0000 (-0500) Subject: Bugfix: Use declval in decltype expression X-Git-Tag: v8.4.0-rc2~435^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1db7463754781fee2c1c3146ca90851fd2aab790;p=dealii.git Bugfix: Use declval in decltype expression ``` decltype(std::declval() * std::declval()) ``` is the correct syntax. This does not require that ```T``` and ```U``` have default constructors... --- diff --git a/include/deal.II/base/template_constraints.h b/include/deal.II/base/template_constraints.h index 28e1f0cb95..3a24b11093 100644 --- a/include/deal.II/base/template_constraints.h +++ b/include/deal.II/base/template_constraints.h @@ -20,7 +20,7 @@ #include #include - +#include DEAL_II_NAMESPACE_OPEN @@ -352,7 +352,7 @@ template struct ProductType { #ifdef DEAL_II_WITH_CXX11 - typedef decltype(T() * U()) type; + typedef decltype(std::declval() * std::declval()) type; #endif };