New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2019-07 LWG Motions 5, 6, and 7 #3115
Conversation
There is major duplication of the specification between the [format.string] p10 that describes alternate form and entries in [tab:format.type.int]. In addition, these two line seem to be in-conflict with regards to appending Could we update the table instead, and remove the description of alternate forms in p10. Floating points types alternate form be moved to p21. |
The [format.string] p16 duplicates information present in the corresponding tables, as they contain none entry. In addition I that causes conflict for the priting of
|
Examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few editorial improvements.
\tcode{Out} models \tcode{OutputIterator<const charT\&>}, and | ||
\tcode{formatter<}$\tcode{T}_i$\tcode{, charT>} | ||
meets the \newoldconcept{Formatter} requirements | ||
for each $\tcode{T}_i$ in \tcode{Args}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting functions above are missing this precondition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but not editorial. Please file an LWG issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may have been wrong.
The non v
-prefixed functions are OK since the precondition is subsumed via equivalent to semantics as specified in make_format_args
and family.
For the v
-prefixed ones, however, they are as a Constraints: on their call site, as specified in the constructor for basic_format_arg
taking a T
, which is required to construct the arguments of type format_args
and family.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JohelEGP we're fine here, right? So this can be resolved? If not, can you please file an LWG issue for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to file a LWG issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After all, there's no real issue here. You could theoretically dance around with decltype
to get the types needed to make an expression equivalent to calling make_format_args
and thus skip its preconditions, but that's not practical.
946ebb1
to
0c531d7
Compare
Editorial cleanups throughout. Converted grammar to proper grammar formatting. Removed incorrect single and double quotes that caused the wording to be meaningless for wchar_t. Converted some duplicated normative wording to notes.
out separate positive-integer and nonnegative-integer productions for clarity.
presupposes that they are all present to instead specify what happens when some or all are absent.
rather than leaving it dangling.
of format_context, as discussed on lib reflector.
Minor editorial cleanups throughout [format.functions] Merged specification of functions with locale parameter into existing specification rather than duplicating the descriptions.
bool and charT in their respective tables rather than requiring the reader to infer how to merge the integer table into the bool and charT tables.
Co-Authored-By: Johel Ernesto Guerrero Peña <johelegp@gmail.com>
6c211d4
to
a870403
Compare
I would prefer we do it the opposite way around. We currently have (roughly) one paragraph per component of the std-format-spec grammar and I'd like to keep it that way. |
I suggest leaving the paragraph, that says that # produces an alternate form, just remove the description of meaning for specifiers, so we could have in one place. The table could just say, that alternate form uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not done reviewing, but what I have so far...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly comments on some FIXMEs.
Fix the specification for '#' being different for octal integers in the two places it's specified.
of formatting from the format specifiers for arithmetic and string types, and make the presentation of the latter consistent with the presentation for chrono types.
b0c43a6
to
e30b8a6
Compare
creating the impression that alignment is only applied to non-string types.
described in terms of a call to to_chars.
This seems fine to me as-is; the primary template has a default argument |
Please take a look at the new wording; I split the difference here, defined the meaning for all cases, and (hopefully) avoided any normative duplication. |
descriptions of specializations that meet those requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more editorial improvements.
\tcode{Out} models \tcode{OutputIterator<const charT\&>}, and | ||
\tcode{formatter<}$\tcode{T}_i$\tcode{, charT>} | ||
meets the \newoldconcept{Formatter} requirements | ||
for each $\tcode{T}_i$ in \tcode{Args}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may have been wrong.
The non v
-prefixed functions are OK since the precondition is subsumed via equivalent to semantics as specified in make_format_args
and family.
For the v
-prefixed ones, however, they are as a Constraints: on their call site, as specified in the constructor for basic_format_arg
taking a T
, which is required to construct the arguments of type format_args
and family.
Despite substantial improvements from what we were given, I'm still not very happy with this wording. Nonetheless, I think it's now good enough for the CD. If there are further comments, please open issues for them and tag them with milestone post-2019-07 so that I know to address them before finalizing the CD. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JohelEGP I'll open edit issues for the remaining unresolved comments. Some of those will probably need to be forwarded to LWG however.
It's not clear to me what issues have not been resolved here. What of the following still need to be dealt with? :
As for the FIXMEs added by @zygoloid about the wording in the Latex sources, I presume these should be filed as LWG issues? Will someone be going thru the various FIXMEs in the motions and dealing with them? |
Apart from the second point, those issues are resolved. As I said, I'll file an issue for the second point. Although I'm not too sure about the last one, @zygoloid removed the duplication, so the last 3 are solved. The first one was about the lack of specification about which |
P0645R10 Text formatting
P1361R2 Integration of chrono with text formatting
P1652R1 Printf corner cases in std::format
Fixes #3009, #3010, #3011.