From 7b6139f23e1412303f0cf79bb0de00e319f85f97 Mon Sep 17 00:00:00 2001
From: Tom Fischer <thomas.fischer@ufz.de>
Date: Wed, 2 Oct 2024 13:19:12 +0200
Subject: [PATCH] [MeL/IO/XDMF] Enable int64 and uint64 data types for
 attributes

---
 MeshLib/IO/XDMF/transformData.cpp | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/MeshLib/IO/XDMF/transformData.cpp b/MeshLib/IO/XDMF/transformData.cpp
index e4745bbc0d6..f436224d83d 100644
--- a/MeshLib/IO/XDMF/transformData.cpp
+++ b/MeshLib/IO/XDMF/transformData.cpp
@@ -140,20 +140,21 @@ std::optional<XdmfHdfData> transformAttribute(
             data_type = MeshPropertyDataType::int32;
         }
         // ToDo (tm) These tests are platform specific and currently fail on
-        // Windows else if constexpr (std::is_same_v<long,
-        // decltype(basic_type)>)
-        //{
-        //    static_assert((std::numeric_limits<long>::digits == 63),
-        //                  "Signed int has 64-1 bits");
-        //    data_type = MeshPropertyDataType::int64;
-        //}
-        // else if constexpr (std::is_same_v<unsigned long,
-        // decltype(basic_type)>)
-        //{
-        //    static_assert((std::numeric_limits<unsigned long>::digits == 64),
-        //                  "Unsigned long has 64 bits");
-        //    data_type = MeshPropertyDataType::uint64;
-        //}
+        // Windows
+#if !defined(_WIN32)
+        else if constexpr (std::is_same_v<long, decltype(basic_type)>)
+        {
+            static_assert((std::numeric_limits<long>::digits == 63),
+                          "Signed int has 64-1 bits");
+            data_type = MeshPropertyDataType::int64;
+        }
+        else if constexpr (std::is_same_v<unsigned long, decltype(basic_type)>)
+        {
+            static_assert((std::numeric_limits<unsigned long>::digits == 64),
+                          "Unsigned long has 64 bits");
+            data_type = MeshPropertyDataType::uint64;
+        }
+#endif
         else if constexpr (std::is_same_v<unsigned int, decltype(basic_type)>)
         {
             static_assert((std::numeric_limits<unsigned int>::digits == 32),
-- 
GitLab