]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a broken templated function
authorJean-Paul Pelteret <jppelteret@gmail.com>
Sun, 5 May 2019 15:42:39 +0000 (17:42 +0200)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Sun, 5 May 2019 15:43:00 +0000 (17:43 +0200)
include/deal.II/differentiation/sd/symengine_scalar_operations.h

index 1c0eb42d5ab6ea1e677423282ef2224ef1133926..02c581c0dc75893d02e0cb70df91667cfc0d2b07 100644 (file)
@@ -183,7 +183,13 @@ namespace Differentiation
      * to simplify the final substitution map by resolving all explicit
      * interdependencies between entries in the substitution map.
      */
-    template <typename ExpressionType = SD::Expression, typename ValueType>
+    template <typename ExpressionType = SD::Expression,
+              typename ValueType,
+              typename = typename std::enable_if<
+                dealii::internal::is_explicitly_convertible<
+                  ExpressionType,
+                  const SymEngine::RCP<const SymEngine::Basic> &>::value &&
+                std::is_constructible<ExpressionType, ValueType>::value>::type>
     types::substitution_map
     make_substitution_map(const ExpressionType &symbol, const ValueType &value);
 
@@ -608,9 +614,9 @@ namespace Differentiation
     /* ---------------- Symbolic substitution map creation --------------*/
 
 
-    template <typename ValueType>
+    template <typename ExpressionType, typename ValueType, typename>
     types::substitution_map
-    make_substitution_map(const Expression &symbol, const ValueType &value)
+    make_substitution_map(const ExpressionType &symbol, const ValueType &value)
     {
       types::substitution_map substitution_map;
       add_to_substitution_map(substitution_map, symbol, value);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.