MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / fallback_uintptr

Class fallback_uintptr

extlibs/fmt/include/fmt/format.h:258–269  ·  view source on GitHub ↗

A fallback implementation of uintptr_t for systems that lack it.

Source from the content-addressed store, hash-verified

256
257// A fallback implementation of uintptr_t for systems that lack it.
258struct fallback_uintptr {
259 unsigned char value[sizeof(void*)];
260
261 fallback_uintptr() = default;
262 explicit fallback_uintptr(const void* p) {
263 *this = bit_cast<fallback_uintptr>(p);
264 if (is_big_endian()) {
265 for (size_t i = 0, j = sizeof(void*) - 1; i < j; ++i, --j)
266 std::swap(value[i], value[j]);
267 }
268 }
269};
270#ifdef UINTPTR_MAX
271using uintptr_t = ::uintptr_t;
272inline uintptr_t to_uintptr(const void* p) { return bit_cast<uintptr_t>(p); }

Callers 1

to_uintptrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected