C++23/cpp.stringize states:
the original spelling of each preprocessing token in the stringizing argument is retained in the character string literal
What does the phrase “original spelling” refers to exactly?
The existing implementations all seem to consistently use the spelling after line splicing, but before UCN replacement. Consider the following snippet:
#include <stdio.h>
#define STR2(x) #x
#define STR(x) STR2(x)
int main()
{
printf(STR(STR(naïve)));
printf(STR(STR(nau{ef}ve)));
printf(STR(STR(nau{ef}v
e)));
}
All implementations end up with the following output:
"naïve""nau{ef}ve""nau{ef}ve"
Are they correct?