chromium / subspace

A concept-centered standard library for C++20, enabling safer and more reliable products and a more modern feel for C++ code.; Also home of Subdoc the code-documentation generator.
https://suslib.cc
Apache License 2.0
89 stars 15 forks source link

Fix compilation on Clang Mac #325

Closed danakj closed 1 year ago

danakj commented 1 year ago

On Mac, the size_t and uintptr_t types are not interchangeable with uint32_t or uint64_t, so don't use them as the usize and uptr primitive_value field types. Doing so leads to ambiguous overload problems when calling overloads based on uint32_t and uint64_t as it could convert to either one.

Instead, use the uint32_t or uint64_t type directly.

Include option.h in size_hint_impl.h to ensure the formattability of it is visible always when defining the formatting of SizeHint.