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

Fix FMT_FORMAT_AS const specifier position #1554

Merged
merged 1 commit into from
Feb 23, 2020
Merged

Conversation

fghzxm
Copy link
Contributor

@fghzxm fghzxm commented Feb 17, 2020

The current FMT_FORMAT_AS macro will make formatter<Char *>::format
have the first argument type const Char *& which is incorrect an
should be Char *const &. This pull request fixes that by changing the
first argument type in the macro definition body from const Type & to
Type const &.

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

The current `FMT_FORMAT_AS` macro will make `formatter<Char *>::format`
have the first argument type `const Char *&` which is incorrect an
should be `Char *const &`.  This pull request fixes that by changing the
first argument type in the macro definition body from `const Type &` to
`Type const &`.
@fghzxm fghzxm requested a review from vitaut February 17, 2020 12:28
@vitaut vitaut merged commit 2161a73 into fmtlib:master Feb 23, 2020
@vitaut
Copy link
Contributor

vitaut commented Feb 23, 2020

Good catch, thanks!

sthagen added a commit to sthagen/fmtlib-fmt that referenced this pull request Feb 23, 2020
Fix FMT_FORMAT_AS const specifier position (fmtlib#1554)
teajay-fr pushed a commit to teajay-fr/fmt that referenced this pull request Mar 18, 2020
The current `FMT_FORMAT_AS` macro will make `formatter<Char *>::format`
have the first argument type `const Char *&` which is incorrect an
should be `Char *const &`.  This pull request fixes that by changing the
first argument type in the macro definition body from `const Type &` to
`Type const &`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants