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

Function write_escaped_alternative

include/fmt/std.h:136–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134
135template <typename Char, typename OutputIt, typename T, typename FormatContext>
136FMT_CONSTEXPR auto write_escaped_alternative(OutputIt out, const T& v,
137 FormatContext& ctx) -> OutputIt {
138 if constexpr (has_to_string_view<T>::value)
139 return write_escaped_string<Char>(out, detail::to_string_view(v));
140 if constexpr (std::is_same_v<T, Char>) return write_escaped_char(out, v);
141
142 formatter<std::remove_cv_t<T>, Char> underlying;
143 maybe_set_debug_format(underlying, true);
144 return underlying.format(v, ctx);
145}
146#endif
147
148#if FMT_CPP_LIB_VARIANT

Callers

nothing calls this directly

Calls 4

to_string_viewFunction · 0.85
write_escaped_charFunction · 0.85
maybe_set_debug_formatFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected