MCPcopy Create free account
hub / github.com/fmtlib/fmt / write_ptr

Function write_ptr

include/fmt/format.h:1748–1759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1746
1747template <typename Char, typename OutputIt, typename UIntPtr>
1748auto write_ptr(OutputIt out, UIntPtr value, const format_specs* specs)
1749 -> OutputIt {
1750 int num_digits = count_digits<4>(value);
1751 auto size = to_unsigned(num_digits) + size_t(2);
1752 auto write = [=](reserve_iterator<OutputIt> it) {
1753 *it++ = static_cast<Char>('0');
1754 *it++ = static_cast<Char>('x');
1755 return format_base2e<Char>(4, it, value, num_digits);
1756 };
1757 return specs ? write_padded<Char, align::right>(out, *specs, size, write)
1758 : base_iterator(out, write(reserve(out, size)));
1759}
1760
1761// Returns true iff the code point cp is printable.
1762FMT_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.70
reserveFunction · 0.70

Tested by

no test coverage detected