Skip to content

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