[2026-06 LWG Motion 6] P3395R6 (Fix encoding issues and add a formatter for std::error_code)#9129
[2026-06 LWG Motion 6] P3395R6 (Fix encoding issues and add a formatter for std::error_code)#9129notdanhan wants to merge 3 commits into
Conversation
510ad55 to
4405b34
Compare
eisenwave
left a comment
There was a problem hiding this comment.
Needs a fair amount of work, mainly converting to \grammarterm.
eisenwave
left a comment
There was a problem hiding this comment.
Some things are clearly wrong, but I could use some advice from @jensmaurer on the multi-paragraph \effects thing.
| \end{ncbnf} | ||
|
|
||
| where the productions and \fmtgrammarterm{fill-and-align} and \fmtgrammarterm{width} are | ||
| described in\iref{format.string}. |
There was a problem hiding this comment.
| described in\iref{format.string}. | |
| described in \ref{format.string}. |
| \begin{itemize} | ||
| \item | ||
| If \tcode{charT} is \tcode{char} and the ordinary literal encoding is UTF-8, | ||
| let \tcode{msg} be \tcode{ec.message()} transcoded to UTF-8 |
There was a problem hiding this comment.
| let \tcode{msg} be \tcode{ec.message()} transcoded to UTF-8 | |
| then let \tcode{msg} be \tcode{ec.message()} transcoded to UTF-8 |
|
|
||
| \pnum | ||
| Otherwise, let \tcode{msg} be \tcode{std::format("{}:{}", ec.category().name(), ec.value())}. | ||
|
|
||
| \pnum | ||
| If the \tcode{?} option is used then \tcode{msg} is formatted as an escaped string(\iref{format.string.escaped}). | ||
| Writes \tcode{msg} into \tcode{ctx.out()}, adjusted according to the \fmtgrammarterm{error-code-format-spec}. |
There was a problem hiding this comment.
This all seems to be a scription of Effects to me, not separate paragraphs, but maybe I'm missing something. The paper does put gaps here, but idk, this is weird.
| \pnum | |
| Otherwise, let \tcode{msg} be \tcode{std::format("{}:{}", ec.category().name(), ec.value())}. | |
| \pnum | |
| If the \tcode{?} option is used then \tcode{msg} is formatted as an escaped string(\iref{format.string.escaped}). | |
| Writes \tcode{msg} into \tcode{ctx.out()}, adjusted according to the \fmtgrammarterm{error-code-format-spec}. | |
| Otherwise, let \tcode{msg} be \tcode{std::format("{}:{}", ec.category().name(), ec.value())}. | |
| If the \tcode{?} option is used then \tcode{msg} is formatted as an escaped string(\iref{format.string.escaped}). | |
| Writes \tcode{msg} into \tcode{ctx.out()}, adjusted according to the \fmtgrammarterm{error-code-format-spec}. |
There was a problem hiding this comment.
I think we do have multi-paragraph \effects in some places, but having a separate paragraph for every sentence is certainly non-optimal.
| Otherwise, let \tcode{msg} be \tcode{std::format("{}:{}", ec.category().name(), ec.value())}. | ||
|
|
||
| \pnum | ||
| If the \tcode{?} option is used then \tcode{msg} is formatted as an escaped string(\iref{format.string.escaped}). |
There was a problem hiding this comment.
| If the \tcode{?} option is used then \tcode{msg} is formatted as an escaped string(\iref{format.string.escaped}). | |
| If the \tcode{?} option is used | |
| then \tcode{msg} is formatted as an escaped string\iref{format.string.escaped}. |
Fixes: #9093
Also Fixes cplusplus/papers#2187