]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a static_assert to actually make sense. 12088/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 23 Apr 2021 15:49:32 +0000 (09:49 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 23 Apr 2021 15:49:32 +0000 (09:49 -0600)
More specifically, there is a specialization Tensor<0,dim,Number> so we should
reallly never get here with rank==0.

include/deal.II/base/tensor.h

index dfbbd3c510e32c58bcfe59af2776a130434356e7..f5894dc94498b8c313a36681549ea59d9db2c391 100644 (file)
@@ -449,7 +449,7 @@ template <int rank_, int dim, typename Number>
 class Tensor
 {
 public:
-  static_assert(rank_ >= 0,
+  static_assert(rank_ >= 1,
                 "Tensors must have a rank greater than or equal to one.");
   static_assert(dim >= 0,
                 "Tensors must have a dimension greater than or equal to one.");

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.