std::format parsing callbacks and machinery#1616
Merged
barcharcraz merged 32 commits intomicrosoft:feature/formatfrom Feb 18, 2021
Merged
std::format parsing callbacks and machinery#1616barcharcraz merged 32 commits intomicrosoft:feature/formatfrom
barcharcraz merged 32 commits intomicrosoft:feature/formatfrom
Conversation
cpplearner
reviewed
Feb 3, 2021
CaseyCarter
suggested changes
Feb 4, 2021
miscco
reviewed
Feb 12, 2021
miscco
reviewed
Feb 12, 2021
Comment on lines
+437
to
+558
| _CharT _Ch = _CharT{}; | ||
| if (_Begin != _End) { | ||
| _Ch = *_Begin; | ||
| } |
Contributor
There was a problem hiding this comment.
I think that if _Begin == _End we will always end up in the throw error case.
At least for me It would be clearer if we would write it like that
Suggested change
| _CharT _Ch = _CharT{}; | |
| if (_Begin != _End) { | |
| _Ch = *_Begin; | |
| } | |
| if (_Begin == _End) { | |
| throw format_error("Missing '}' in format string."); | |
| } | |
| const _CharT _Ch = *_Begin; |
miscco
reviewed
Feb 12, 2021
miscco
reviewed
Feb 12, 2021
miscco
reviewed
Feb 12, 2021
added 12 commits
February 17, 2021 12:25
18fa4dc to
d0e5304
Compare
CaseyCarter
approved these changes
Feb 18, 2021
Contributor
CaseyCarter
left a comment
There was a problem hiding this comment.
Feel free to merge as-is and make changes in a later PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_Parse_format_string_Parse_replacement_field_Specs_setterand_Basic_format_specs_Specs_checker, and_Numeric_specs_checker_Format_handler(note that_On_format_specsis incomplete)vformat_todefinitionbasic_format_args::getin total this is enough to get
vformat_toinstantiations to compile, although we can't run them without a few morebasic_format_argandbasic_format_argsrelated things.Note that this
vformat_tois the C++ 20 version ofvformat_to, NOT the proposed C++23 version (they have different ABIs)Also note that this PR contains merge commits, they should go away if it's squashed, however.