| 4129 | |
| 4130 | template <typename FormatContext, typename F> |
| 4131 | auto write_padded(FormatContext& ctx, F write) const -> decltype(ctx.out()) { |
| 4132 | if (width_ == 0) return write(ctx.out()); |
| 4133 | auto buf = basic_memory_buffer<Char>(); |
| 4134 | write(basic_appender<Char>(buf)); |
| 4135 | auto specs = format_specs(); |
| 4136 | specs.width = width_; |
| 4137 | specs.copy_fill_from(specs_); |
| 4138 | specs.set_align(specs_.align()); |
| 4139 | return detail::write<Char>( |
| 4140 | ctx.out(), basic_string_view<Char>(buf.data(), buf.size()), specs); |
| 4141 | } |
| 4142 | |
| 4143 | auto nested(const T& value) const -> nested_view<T, Char> { |
| 4144 | return nested_view<T, Char>{&formatter_, &value}; |
no test coverage detected