Lines Matching refs:specs
160 explicit printf_width_handler(format_specs& specs) : specs_(specs) {}
221 this->specs()->type = 0;
226 this->specs()->type = 0;
240 printf_arg_formatter(iterator iter, format_specs& specs, context_type& ctx)
241 : base(iter, &specs, detail::locale_ref()), context_(ctx) {}
248 format_specs& fmt_specs = *this->specs();
253 format_specs& fmt_specs = *this->specs();
279 else if (this->specs()->type == 'p')
290 else if (this->specs()->type == 'p')
306 this->specs()->type = 0;
352 static void parse_flags(format_specs& specs, const Char*& it,
360 int parse_header(const Char*& it, const Char* end, format_specs& specs);
392 void basic_printf_context<OutputIt, Char>::parse_flags(format_specs& specs,
398 specs.align = align::left;
401 specs.sign = sign::plus;
404 specs.fill[0] = '0';
407 if (specs.sign != sign::plus) {
408 specs.sign = sign::space;
412 specs.alt = true;
433 format_specs& specs) {
445 if (c == '0') specs.fill[0] = '0';
449 specs.width = value;
454 parse_flags(specs, it, end);
459 specs.width = parse_nonnegative_int(it, end, eh);
462 specs.width = static_cast<int>(visit_format_arg(
463 detail::printf_width_handler<char_type>(specs), get_arg()));
486 format_specs specs;
487 specs.align = align::right;
490 int arg_index = parse_header(it, end, specs);
499 specs.precision = parse_nonnegative_int(it, end, eh);
502 specs.precision = static_cast<int>(
505 specs.precision = 0;
512 if (specs.precision >= 0 && arg.is_integral())
513 specs.fill[0] =
515 if (specs.precision >= 0 && arg.type() == detail::type::cstring_type) {
517 auto str_end = str + specs.precision;
521 detail::to_unsigned(nul != str_end ? nul - str : specs.precision)));
523 if (specs.alt && visit_format_arg(detail::is_zero_int(), arg))
524 specs.alt = false;
525 if (specs.fill[0] == '0') {
526 if (arg.is_arithmetic() && specs.align != align::left)
527 specs.align = align::numeric;
529 specs.fill[0] = ' '; // Ignore '0' flag for non-numeric types or if '-'
576 specs.type = static_cast<char>(*it++);
579 switch (specs.type) {
582 specs.type = 'd';
594 out = visit_format_arg(ArgFormatter(out, specs, *this), arg);