From: Daniel Arndt <arndtd@ornl.gov>
Date: Tue, 19 Nov 2019 23:47:36 +0000 (-0500)
Subject: Avoid ambiguous unrolled_to_component_indices call
X-Git-Tag: v9.2.0-rc1~865^2
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9062%2Fhead;p=dealii.git

Avoid ambiguous unrolled_to_component_indices call
---

diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h
index c22df7bf42..de83b3e9a5 100644
--- a/include/deal.II/base/symmetric_tensor.h
+++ b/include/deal.II/base/symmetric_tensor.h
@@ -2401,9 +2401,10 @@ namespace internal
     // this function is for tensors of a rank not already handled
     // above
     template <int dim, int rank_>
-    DEAL_II_CONSTEXPR inline TableIndices<rank_>
-    unrolled_to_component_indices(const unsigned int i,
-                                  const std::integral_constant<int, rank_> &)
+    DEAL_II_CONSTEXPR inline
+      typename std::enable_if<rank_ != 2, TableIndices<rank_>>::type
+      unrolled_to_component_indices(const unsigned int i,
+                                    const std::integral_constant<int, rank_> &)
     {
       (void)i;
       Assert(