MCPcopy Create free account
hub / github.com/LemLib/LemLib / write_ptr

Function write_ptr

include/fmt/format.h:1706–1715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1704
1705template <typename Char, typename OutputIt, typename UIntPtr>
1706auto write_ptr(OutputIt out, UIntPtr value, const format_specs<Char>* specs) -> OutputIt {
1707 int num_digits = count_digits<4>(value);
1708 auto size = to_unsigned(num_digits) + size_t(2);
1709 auto write = [=](reserve_iterator<OutputIt> it) {
1710 *it++ = static_cast<Char>('0');
1711 *it++ = static_cast<Char>('x');
1712 return format_uint<4, Char>(it, value, num_digits);
1713 };
1714 return specs ? write_padded<align::right>(out, *specs, size, write) : base_iterator(out, write(reserve(out, size)));
1715}
1716
1717// Returns true iff the code point cp is printable.
1718FMT_API auto is_printable(uint32_t cp) -> bool;

Callers

nothing calls this directly

Calls 4

to_unsignedFunction · 0.85
base_iteratorFunction · 0.85
writeFunction · 0.85
reserveFunction · 0.70

Tested by

no test coverage detected