aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2023-02-03 10:20:36 +0100
committerMartin Ridgers <[email protected]>2023-02-03 10:21:25 +0100
commit9e18f34e7d6b32f96cfa2456d7c7ea2ab5d6f123 (patch)
tree688864ff8a2831d6af392b1e421227acfa077aa2 /zencore/include
parentCommented out breakpad_client xmake.lua adjustment - not applicable yet (diff)
downloadzen-9e18f34e7d6b32f96cfa2456d7c7ea2ab5d6f123.tar.xz
zen-9e18f34e7d6b32f96cfa2456d7c7ea2ab5d6f123.zip
Added a size_t override for Apple Clang where types as size_t != uint64_t
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/compactbinarybuilder.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/zencore/include/zencore/compactbinarybuilder.h b/zencore/include/zencore/compactbinarybuilder.h
index 5f6d9fd0c..5311bbb07 100644
--- a/zencore/include/zencore/compactbinarybuilder.h
+++ b/zencore/include/zencore/compactbinarybuilder.h
@@ -539,6 +539,17 @@ operator<<(CbWriter& Writer, std::nullptr_t)
return Writer;
}
+#if defined(__clang__) && defined(__APPLE__)
+/* Apple Clang has different types for uint64_t and size_t so an override is
+ needed here. Without it, Clang can't disambiguate integer overloads */
+inline CbWriter&
+operator<<(CbWriter& Writer, std::size_t Value)
+{
+ Writer.AddInteger(uint64_t(Value));
+ return Writer;
+}
+#endif
+
inline CbWriter&
operator<<(CbWriter& Writer, std::wstring_view Value)
{