Support compiling pattern literal strings at compile-time#3404
Draft
SpriteOvO wants to merge 2 commits intogabime:v1.xfrom
Draft
Support compiling pattern literal strings at compile-time#3404SpriteOvO wants to merge 2 commits intogabime:v1.xfrom
SpriteOvO wants to merge 2 commits intogabime:v1.xfrom
Conversation
3936f33 to
7cab222
Compare
7cab222 to
b5d38b4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implementation of #3384.
The PR is currently in a very early stage, so it is incomplete and will continue to be changed. Opening it as a draft to take notes, track progress, and early review.
API
For users, I currently expect the API to be
Internal
Maintainability
The code for the flag formatters remains almost unchanged. If a new flag needs to be added in the future, perhaps just add an if constexpr.
Notable Changes
All flag formatters are moved from file
pattern_formatter-inl.htopattern_formatter.h.constevalimpliesinline, aconstevalfunction can't be split into a definition and a declaration, therefore all flag formatters must be visible to theseconstevalfunctions. However, they are still insidedetailsnamespace.SPDLOG_CONSTEXPR_FUNChas been added to the explicit constructors of all flag formatters.For some unsure concerns, TODO comments were left.
... TBD
Steps
static_pattern_formatter.{,static_}pattern_formatteroutputs are consistent.