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

Projects
None yet
1 participant
@jeking3
Collaborator

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 the enhancement label Oct 24, 2017

@jeking3 jeking3 added this to the v1.66.0 milestone Oct 24, 2017

@jeking3 jeking3 self-assigned this Oct 24, 2017

@jeking3

This comment has been minimized.

Show comment
Hide comment
@jeking3

jeking3 Oct 24, 2017

Collaborator

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

Collaborator

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

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@jeking3 jeking3 deleted the jeking3:issue-29 branch Oct 24, 2017

jeking3 pushed a commit to jeking3/format that referenced this pull request Jun 17, 2018

Merge pull request boostorg#42 from Lastique/fix_years_overflow2
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