]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Revert "Bugfix: Allow compilation in C++98 mode"
authorMatthias Maier <tamiko@43-1.org>
Thu, 19 Mar 2020 23:37:27 +0000 (18:37 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 20 Mar 2020 04:21:26 +0000 (23:21 -0500)
This reverts commit f61b1485f9d54066349239c83361db231f13c42e.

include/deal.II/base/tensor.h

index 553d7fcf25e94a038fc44dc1dfcc396666923fb0..a45d3ff217d8899a6941f4a4472f5ca0093beef5 100644 (file)
@@ -58,18 +58,6 @@ namespace Differentiation
 } // namespace Differentiation
 #endif
 
-#ifndef DOXYGEN
-// Overload invalid tensor types of negative rank that come up during
-// overload resolution of operator* and related contraction variants.
-template <int dim, typename Number>
-class Tensor<-2, dim, Number>
-{};
-
-template <int dim, typename Number>
-class Tensor<-1, dim, Number>
-{};
-#endif /* DOXYGEN */
-
 
 /**
  * This class is a specialized version of the <tt>Tensor<rank,dim,Number></tt>
@@ -2010,7 +1998,8 @@ template <int rank_1,
           int rank_2,
           int dim,
           typename Number,
-          typename OtherNumber>
+          typename OtherNumber,
+          typename = typename std::enable_if<rank_1 >= 1 && rank_2 >= 1>::type>
 DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE
   typename Tensor<rank_1 + rank_2 - 2,
                   dim,

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.