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

Method format_signed

include/fmt/format.h:4193–4200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4191
4192 template <typename Int>
4193 FMT_CONSTEXPR20 auto format_signed(Int value) -> char* {
4194 auto abs_value = static_cast<detail::uint32_or_64_or_128_t<Int>>(value);
4195 bool negative = value < 0;
4196 if (negative) abs_value = 0 - abs_value;
4197 auto begin = format_unsigned(abs_value);
4198 if (negative) *--begin = '-';
4199 return begin;
4200 }
4201
4202 public:
4203 FMT_CONSTEXPR20 explicit format_int(int value) : str_(format_signed(value)) {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected