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

Function write2digits

include/fmt/format.h:1205–1213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1203// Writes a two-digit value to out.
1204template <typename Char>
1205FMT_CONSTEXPR20 FMT_INLINE void write2digits(Char* out, size_t value) {
1206 if (!is_constant_evaluated() && std::is_same<Char, char>::value &&
1207 !FMT_OPTIMIZE_SIZE) {
1208 memcpy(out, digits2(value), 2);
1209 return;
1210 }
1211 *out++ = static_cast<Char>('0' + value / 10);
1212 *out = static_cast<Char>('0' + value % 10);
1213}
1214
1215template <typename Char>
1216FMT_INLINE void write2digits_i(Char* out, size_t value) {

Callers 5

on_iso_dateMethod · 0.85
do_format_decimalFunction · 0.85
write_significandMethod · 0.85
format_floatMethod · 0.85
writeMethod · 0.85

Calls 2

is_constant_evaluatedFunction · 0.85
digits2Function · 0.85

Tested by

no test coverage detected