<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 7, 2014 at 6:25 PM, Howard Hinnant <span dir="ltr"><<a href="mailto:hhinnant@apple.com" target="_blank">hhinnant@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Jan 7, 2014, at 8:43 PM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:<br>

<br>
> It would be more correct to use "operator\"\"" here (without the trailing<br>
> space). This will generate an incorrect unmangled name for operator""if,<br>
> which can only be written without the space.<br>
<br>
</div>Interesting trivia.  Such a suffix can only be standard specified (lacking a '_' prefix).  Are there any other such examples?  I experimented with "do", "for" and "while" with no success.</blockquote>
<div><br></div><div>On the clang side, we have a whitelist of permitted non-'_'-prefixed suffixes. This is to avoid gratuitously breaking existing (C++98) code -- if we allowed ""foo for arbitrary foo, we'd break code where foo is defined as a macro (expanding to a string literal). Such code is common, for things like "%8"PRIuS. We /do/ allow arbitrary '_'-prefixed suffixes, and that breaks code like "foo"__FILE__, but such code appears to be less common in practice. The only keyword on our whitelist is "if".</div>
<div><br></div><div>Under GCC, the whitelist is anything starting with a lowercase letter, and things like operator""for and operator""while work there (with a warning that they are reserved).</div></div>
</div></div>