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

Method parse

include/fmt/format.h:4114–4128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4112 constexpr nested_formatter() : width_(0) {}
4113
4114 FMT_CONSTEXPR auto parse(parse_context<Char>& ctx) -> const Char* {
4115 auto it = ctx.begin(), end = ctx.end();
4116 if (it == end) return it;
4117 auto specs = format_specs();
4118 it = detail::parse_align(it, end, specs);
4119 specs_ = specs;
4120 Char c = *it;
4121 auto width_ref = detail::arg_ref<Char>();
4122 if ((c >= '0' && c <= '9') || c == '{') {
4123 it = detail::parse_width(it, end, specs, width_ref, ctx);
4124 width_ = specs.width;
4125 }
4126 ctx.advance_to(it);
4127 return formatter_.parse(ctx);
4128 }
4129
4130 template <typename FormatContext, typename F>
4131 auto write_padded(FormatContext& ctx, F write) const -> decltype(ctx.out()) {

Callers

nothing calls this directly

Calls 7

format_specsClass · 0.85
parse_alignFunction · 0.85
parse_widthFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
advance_toMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected