File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -17713,12 +17713,13 @@
1771317713 // Parses a width argument id in the format \tcode{\{} \fmtgrammarterm{digit} \tcode{\}}.
1771417714 constexpr auto parse(format_parse_context& ctx) {
1771517715 auto iter = ctx.begin();
17716+ auto is_digit = [](auto c) { return c >= '0' && c <= '9'; };
1771617717 auto get_char = [&]() { return iter != ctx.end() ? *iter : 0; };
1771717718 if (get_char() != '{')
1771817719 return iter;
1771917720 ++iter;
1772017721 char c = get_char();
17721- if (!isdigit (c) || (++iter, get_char()) != '}')
17722+ if (!is_digit (c) || (++iter, get_char()) != '}')
1772217723 throw format_error("invalid format");
1772317724 width_arg_id = c - '0';
1772417725 ctx.check_arg_id(width_arg_id);
1773517736 else
1773617737 return value;
1773717738 });
17738- return format_to(ctx.out(), "{0:x< {1}}", s.value, width);
17739+ return format_to(ctx.out(), "{0:x> {1}}", s.value, width);
1773917740 }
1774017741};
1774117742
You can’t perform that action at this time.
0 commit comments