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
[version.syn] Add digit separators between year and month #5117
Conversation
The exact spelling of the macro is observable to stringization and token concatenation though? |
Do you have an example? This one isn't one:
outputs |
https://godbolt.org/z/Wq64xrand #define date 2019'07L
#define cat(x, y) x ## y
#define S(y) cat(x, y)
const char s[] = S(date);
|
Ok. Without the digit separator, we get:
which yields
i.e. we get a valid identifier. |
@jwakely , do you feel we should file a library issue to make the presence or absence of digit separators in feature-test macros unspecified, thus making the concatenation magic shown in this issue not portable? |
I don't see any advantage to allowing them. Six digits, where the first four are a recent year, doesn't seem too hard to read without separators. I want going to comment here if everybody else liked the idea, but I don't actually like the results with the separators. |
So, this is not editorial (because adding the digit separator breaks preprocessor token concatenation). The absence of digit separators is not a defect (thus an LWG issue is not the right thing). |
Fixes #5109