-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Custom FormatSpec (#439) #444
Conversation
…ArgFormatter chain (fmtlib#439)
Tested on VS2015 only... Obviously. |
Thanks for the PR. Mostly looks good but could you default the |
Clean enough? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few minor comments re formatting.
@@ -120,7 +120,7 @@ custom argument formatter class:: | |||
// A custom argument formatter that formats negative integers as unsigned | |||
// with the ``x`` format specifier. | |||
class CustomArgFormatter : | |||
public fmt::BasicArgFormatter<CustomArgFormatter, char> { | |||
public fmt::BasicArgFormatter<CustomArgFormatter, char> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought it was just a mistake. Why the extra space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LOL, my bad. I misread the diff and thought it was added. No need for an extra space of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(git is so much fun)
class CustomArgFormatter | ||
: public fmt::BasicArgFormatter<CustomArgFormatter, char> { | ||
class CustomArgFormatter : | ||
public fmt::BasicArgFormatter<CustomArgFormatter, char> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the original formatting here and below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I have changed this one to comply to the one below, which I left untouched from master:
class CustomPrintfArgFormatter :
public BasicPrintfArgFormatter<CustomPrintfArgFormatter, char> {
I'll correct both then
Style changes applied. It got quite noisy here so I can create an all-in-one PR once you've validated the whole thing if you prefer. |
* A custom FormatSpec type can be passed as a template argument to the ArgFormatter chain (#439) * Corrected nested-name-specifier error * Spec template argument defaulted to FormatSpec * Forward declaration of FormatSpec * Style * Style (part 2) * Style (part 3)
No worries, I squashed it via GitHub interface. Thanks for contributing! |
No description provided.