Skip to content
Snippets Groups Projects
Commit 7b6139f2 authored by Tom Fischer's avatar Tom Fischer
Browse files

[MeL/IO/XDMF] Enable int64 and uint64 data types for attributes

parent 76e3bb49
No related branches found
No related tags found
No related merge requests found
......@@ -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),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment