Skip to content
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

[cpp.pragma.op] Take into account encoding-prefixes other than 'L' #1388

Closed
Eelis opened this issue Jan 18, 2017 · 4 comments
Closed

[cpp.pragma.op] Take into account encoding-prefixes other than 'L' #1388

Eelis opened this issue Jan 18, 2017 · 4 comments
Assignees
Labels
cwg Issue must be reviewed by CWG.

Comments

@Eelis
Copy link
Contributor

Eelis commented Jan 18, 2017

[cpp.pragma.op] says:

The string literal is destringized by deleting the L prefix, if present, [...]

This sounds left over from the days where L was the only encoding-prefix. I would expect that these days, the intent is to also delete other encoding-prefixes, and possibly even handle raw string literals. So I think cwg might want to take a look.

@jensmaurer jensmaurer self-assigned this Jan 19, 2017
@jensmaurer jensmaurer added the cwg Issue must be reviewed by CWG. label Jan 19, 2017
@jensmaurer
Copy link
Member

I've asked for a core issue to fix this.

Subject: 16.9 [cpp.pragma.op] refers to "L" prefix only
Date: Thu, 19 Jan 2017 15:20:37 +0100
To: William M. (Mike) Miller william.m.miller@gmail.com

16.9 [cpp.pragma.op] first paragraph:

"The string literal is destringized by deleting the L prefix, if present, ..."

We nowadays have a lot more string literal prefixes to delete.

For comparison, C11 says:

"The string literal is destringized by deleting any encoding prefix, ..."

C++ should follow. (This is also editorial issue #1388.)

@cpplearner
Copy link
Contributor

This is CWG 897.

@Eelis
Copy link
Contributor Author

Eelis commented Jan 19, 2017

Wow, known since 2009 already!

@jensmaurer
Copy link
Member

Closing this editorial issue, since it's handled by CWG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG.
Projects
None yet
Development

No branches or pull requests

3 participants