]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use static_assert to ensure correct type 13883/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Thu, 2 Jun 2022 07:38:40 +0000 (09:38 +0200)
committerMartin Kronbichler <martin.kronbichler@uni-a.de>
Thu, 2 Jun 2022 07:38:40 +0000 (09:38 +0200)
source/matrix_free/dof_info.cc

index 74bb04d153071ea0821bb709902d5980aa83a312..ac7e721ff1572cee2121d52c9e211fcc21ca8a33 100644 (file)
@@ -28,6 +28,13 @@ namespace internal
 {
   namespace MatrixFreeFunctions
   {
+    // ensure that the type defined in both dof_info.h and
+    // hanging_nodes_internal.h is consistent
+    static_assert(std::is_same<compressed_constraint_kind, std::uint8_t>::value,
+                  "Unexpected type for compressed hanging node indicators!");
+
+
+
     DoFInfo::DoFInfo()
     {
       clear();

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.