This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Attachment: CL_lit_oper_style
Description: Binary data

Attachment: patch_lit_oper_style
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]