From edee52fb7e37f0e888e47ab4042cc61b373d1498 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Wed, 8 Jun 2016 23:34:42 +0000
Subject: [PATCH] [MaL] Move GlobalIndexType asserts.

---
 MathLib/LinAlg/GlobalMatrixVectorTypes.h | 9 +++++++++
 NumLib/NumericsConfig.h                  | 8 --------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/MathLib/LinAlg/GlobalMatrixVectorTypes.h b/MathLib/LinAlg/GlobalMatrixVectorTypes.h
index 6b91a620c3f..7f0751d6c35 100644
--- a/MathLib/LinAlg/GlobalMatrixVectorTypes.h
+++ b/MathLib/LinAlg/GlobalMatrixVectorTypes.h
@@ -72,7 +72,16 @@ namespace detail
 
 /// A type used for indexing of global vectors and matrices. It is equal to the
 /// GlobalMatrixType::IndexType and the GlobalVectorType::IndexType.
+static_assert(std::is_integral<detail::GlobalMatrixType::IndexType>::value,
+              "The index type for global matrices is not an integral type.");
+static_assert(std::is_integral<detail::GlobalVectorType::IndexType>::value,
+              "The index type for global vectors is not an integral type.");
+static_assert(std::is_same<detail::GlobalMatrixType::IndexType,
+                           detail::GlobalVectorType::IndexType>::value,
+              "The global matrix and vector index types do not match.");
+// Both types are integral types and equal, define a single GlobalIndexType.
 using GlobalIndexType = detail::GlobalMatrixType::IndexType;
+
 using GlobalSparsityPattern = MathLib::SparsityPattern<GlobalIndexType>;
 
 #endif // MATHLIB_LINALG_GLOBALMATRIXVECTORTYPES_H
diff --git a/NumLib/NumericsConfig.h b/NumLib/NumericsConfig.h
index 19147bd6dfb..607704beddb 100644
--- a/NumLib/NumericsConfig.h
+++ b/NumLib/NumericsConfig.h
@@ -59,13 +59,5 @@ using GlobalSetupType =
 //
 static_assert(std::is_class<GlobalSetupType>::value,
               "GlobalSetupType was not defined.");
-static_assert(std::is_integral<detail::GlobalMatrixType::IndexType>::value,
-              "The index type for global matrices is not an integral type.");
-static_assert(std::is_integral<detail::GlobalVectorType::IndexType>::value,
-              "The index type for global vectors is not an integral type.");
-static_assert(std::is_same<detail::GlobalMatrixType::IndexType,
-                           detail::GlobalVectorType::IndexType>::value,
-              "The global matrix and vector index types do not match.");
-// Both types are integral types and equal, define a single GlobalIndexType.
 
 #endif  // APPLICATIONS_NUMERICSCONFIG_H_
-- 
GitLab