Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 of most format_specs for formatting at compile-time #2056
Add support of most format_specs for formatting at compile-time #2056
Changes from 9 commits
725eedf
aead58e
62abf10
6742642
de42f13
fec7c1a
2980dd3
b8d973a
6714f90
8131d4f
14ce33e
4762f64
5cca27f
1b1c3ce
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Here and elsewhere: please keep
FMT_INLINE
.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.
Yes, I missed that
FMT_INLINE
has an attribute inside, and this line can useFMT_INLINE
andconstexpr
. But those lines whereFMT_INLINE
was replaced byFMT_CONSTEXPR(20)
will have doubleinline
specifier, which makes some compilers unhappy and some very unhappy.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.
So looks like one of these macros shouldn't set
inline
and that would be really strange if this macro is going to beFMT_INLINE
.I can give an example of Hedley, it does not fallback to
inline
in the case whereconstexpr
is not available - https://github.com/nemequ/hedley/blob/5e50f6b735aeb4e09e3b2ad3d1717db3c0613bfa/hedley.h#L1269-L1276and I think it's right because I can always mark a function as
inline
with or withoutconstexpr
, no matter thatconstexpr
impliesinline
.In case you agree with me here I can create a separate PR to remove
inline
fromFMT_CONSTEXPR(20)
macro. Otherwise I just don't know how to fix these problems without introducingFMT_CONSTEXPR(20)_NO_INLINE
macro, which probably would be also bad naming because there isFMT_NOINLINE
macro that expands to additional attribute...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.
Sure.
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.
Done #2075