Difference between revisions of "Code Formatting Conventions"

Jump to navigation Jump to search
→‎Naming: Mention template types and non-member functions
(→‎Special Keywords: added I18N)
(→‎Naming: Mention template types and non-member functions)
 
Line 261: Line 261:
'''Type names'''
'''Type names'''


Camel case starting with upper case.
Camel case starting with upper case. This includes template types.


<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
Line 267: Line 267:
struct MyStruct { /* ... */ };
struct MyStruct { /* ... */ };
typedef int MyInt;
typedef int MyInt;
template typename<FancyPants>
void bestClothes(FancyPants pants) {/* ... */ }
</syntaxhighlight>
</syntaxhighlight>


Line 283: Line 286:
<syntaxhighlight lang="cpp">
<syntaxhighlight lang="cpp">
void thisIsMyFancyMethod();
void thisIsMyFancyMethod();
</syntaxhighlight>
'''Non-member functions'''
Camel case, starting with lowercase.
<syntaxhighlight lang="cpp">
void thisIsMyFancyGlobalFunction();
</syntaxhighlight>
</syntaxhighlight>


Navigation menu