From 1db7463754781fee2c1c3146ca90851fd2aab790 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sat, 12 Sep 2015 01:41:15 -0500 Subject: [PATCH] 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... --- include/deal.II/base/template_constraints.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }; -- 2.39.5