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

Method format

include/fmt/format.h:3841–3851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3839template <typename T, typename Char, type TYPE>
3840template <typename FormatContext>
3841FMT_CONSTEXPR auto native_formatter<T, Char, TYPE>::format(
3842 const T& val, FormatContext& ctx) const -> decltype(ctx.out()) {
3843 if (!specs_.dynamic())
3844 return write<Char>(ctx.out(), val, specs_, ctx.locale());
3845 auto specs = format_specs(specs_);
3846 handle_dynamic_spec(specs.dynamic_width(), specs.width, specs_.width_ref,
3847 ctx);
3848 handle_dynamic_spec(specs.dynamic_precision(), specs.precision,
3849 specs_.precision_ref, ctx);
3850 return write<Char>(ctx.out(), val, specs, ctx.locale());
3851}
3852} // namespace detail
3853
3854FMT_BEGIN_EXPORT

Callers 3

writeMethod · 0.45
operator()Method · 0.45
formatMethod · 0.45

Calls 6

format_specsClass · 0.85
dynamicMethod · 0.80
localeMethod · 0.80
dynamic_widthMethod · 0.80
dynamic_precisionMethod · 0.80
outMethod · 0.45

Tested by

no test coverage detected