[libstdc++,C++11] Library style for user-defined literal operators

3dw4rd@verizon.net 3dw4rd@verizon.net
Tue Oct 22 16:28:00 GMT 2013


Let me try that again. Sorry for the dupe and the bad subject in the previous message.

This patch fixes a small stylistic nit in the user-defined literal operators in the standard library.I propose we prefer: operator""suf - with no spacerather than: operator"" suf - with spaceIt is only strictly necessary to have no space between quotes and suffix identifier when the suffix identifier is a keyword. On the other hand, consistently using no space means never having to say you're sorry. It is also consistent with our style of not having space between operator and, say '+'. I believe that first allowing the space in the first place might have been a mistake in the standard. The (to be committed tonight) literal operators for complex<float> need to have no space because the suffix is 'if'. We might as well be consistent. I think this is better style too.Ed


-------------- next part --------------
A non-text attachment was scrubbed...
Name: CL_lit_oper_style
Type: application/octet-stream
Size: 270 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20131022/f4b07bde/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_lit_oper_style
Type: application/octet-stream
Size: 4558 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20131022/f4b07bde/attachment-0001.obj>


More information about the Libstdc++ mailing list