From d60dc6d674a3ad162c3526e32f89982bf39d57d7 Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Thu, 7 Sep 2023 11:22:29 +0200
Subject: [PATCH] [NL/DOF] Init MeshComponentMap::nop in the class declaration

---
 NumLib/DOF/MeshComponentMap.cpp | 3 ---
 NumLib/DOF/MeshComponentMap.h   | 3 ++-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/NumLib/DOF/MeshComponentMap.cpp b/NumLib/DOF/MeshComponentMap.cpp
index d3a08afbfb3..89730484aee 100644
--- a/NumLib/DOF/MeshComponentMap.cpp
+++ b/NumLib/DOF/MeshComponentMap.cpp
@@ -24,9 +24,6 @@ namespace NumLib
 {
 using namespace detail;
 
-GlobalIndexType const MeshComponentMap::nop =
-    std::numeric_limits<GlobalIndexType>::max();
-
 #ifdef USE_PETSC
 MeshComponentMap::MeshComponentMap(
     std::vector<MeshLib::MeshSubset> const& components, ComponentOrder order)
diff --git a/NumLib/DOF/MeshComponentMap.h b/NumLib/DOF/MeshComponentMap.h
index c7c2cb619e2..02d647f50ff 100644
--- a/NumLib/DOF/MeshComponentMap.h
+++ b/NumLib/DOF/MeshComponentMap.h
@@ -137,7 +137,8 @@ public:
 
     /// A value returned if no global index was found for the requested
     /// location/component. The value is implementation dependent.
-    static NUMLIB_EXPORT GlobalIndexType const nop;
+    static constexpr NUMLIB_EXPORT GlobalIndexType const nop =
+        std::numeric_limits<GlobalIndexType>::max();
 
 #ifndef NDEBUG
     const detail::ComponentGlobalIndexDict& getDictionary() const
-- 
GitLab