Skip to content
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

add support for parsing (and ignoring) argument types 'j', 'z' #42

Merged
merged 1 commit into from
Oct 24, 2017

Conversation

jeking3
Copy link
Contributor

@jeking3 jeking3 commented Oct 24, 2017

Argument types in format specifications are ignored by boost::format because the argument type is carried through the conversion by operator %. Type 't' is already used as a conversion specifier for tabulation therefore we only added what was missing, which was 'j' and 'z'.

With-Commit values are from msvc-14.1.

String Data Pre-Commit With-Commit
%jd std::numeric_limits<intmax_t>::max() - 12345 boost::bad_format_string: format-string is ill-formed 9223372036854763462
%zu std::numeric_limits<size_t>::max() - 12345 boost::bad_format_string: format-string is ill-formed 4294954950

(Remember that size_t on Windows is 32-bit)

This closes #29

@jeking3 jeking3 added this to the v1.66.0 milestone Oct 24, 2017
@jeking3 jeking3 self-assigned this Oct 24, 2017
@jeking3
Copy link
Contributor Author

jeking3 commented Oct 24, 2017

The build has been in the queue for 3 hours so I ran it on my fork and it's fine. Moving on..

@jeking3 jeking3 merged commit 9212dde into boostorg:develop Oct 24, 2017
@jeking3 jeking3 deleted the issue-29 branch October 24, 2017 19:50
jeking3 pushed a commit to jeking3/format that referenced this pull request Jun 17, 2018
Fixed integer overflow when subtracting many years to a gregorian date.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parse additional ISO C99 format string specifiers
1 participant