Make printf work in search (#164)

This commit is contained in:
Victor Zverovich 2018-12-12 16:07:54 -08:00
parent de71db6d42
commit 8c2e15aed5

View File

@ -192,8 +192,16 @@ class printf_width_handler: public function<unsigned> {
return 0;
}
};
template <typename Char, typename Context>
void printf(basic_buffer<Char> &buf, basic_string_view<Char> format,
basic_format_args<Context> args) {
Context(std::back_inserter(buf), format, args).format();
}
} // namespace internal
using internal::printf; // For printing into memory_buffer.
template <typename Range>
class printf_arg_formatter;
@ -566,12 +574,6 @@ void basic_printf_context<OutputIt, Char, AF>::format() {
buffer.append(pointer_from(start), pointer_from(it));
}
template <typename Char, typename Context>
void printf(internal::basic_buffer<Char> &buf, basic_string_view<Char> format,
basic_format_args<Context> args) {
Context(std::back_inserter(buf), format, args).format();
}
template <typename Buffer>
struct basic_printf_context_t {
typedef basic_printf_context<