Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4bdd05d

Browse filesBrowse files
fhinkelMylesBorins
authored andcommitted
doc: add Table of Contents to Cpp style guide
The Cpp style guide is growing. IMHO, a Table of Contents makes it easier to navigate. PR-URL: #17052 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
1 parent 98a0770 commit 4bdd05d
Copy full SHA for 4bdd05d

File tree

Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed
Open diff view settings
Collapse file

‎CPP_STYLE_GUIDE.md‎

Copy file name to clipboardExpand all lines: CPP_STYLE_GUIDE.md
+17Lines changed: 17 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# C++ Style Guide
22

3+
## Table of Contents
4+
5+
* [Left-leaning (C++ style) asterisks for pointer declarations](#left-leaning-c-style-asterisks-for-pointer-declarations)
6+
* [2 spaces of indentation for blocks or bodies of conditionals](#2-spaces-of-indentation-for-blocks-or-bodies-of-conditionals)
7+
* [4 spaces of indentation for statement continuations](#4-spaces-of-indentation-for-statement-continuations)
8+
* [Align function arguments vertically](#align-function-arguments-vertically)
9+
* [Initialization lists](#initialization-lists)
10+
* [CamelCase for methods, functions and classes](#camelcase-for-methods-functions-and-classes)
11+
* [snake\_case for local variables and parameters](#snake_case-for-local-variables-and-parameters)
12+
* [snake\_case\_ for private class fields](#snake_case_-for-private-class-fields)
13+
* [Space after `template`](#space-after-template)
14+
* [Type casting](#type-casting)
15+
* [Memory allocation](#memory-allocation)
16+
* [`nullptr` instead of `NULL` or `0`](#nullptr-instead-of-null-or-0)
17+
* [Do not include `*.h` if `*-inl.h` has already been included](#do-not-include-h-if--inlh-has-already-been-included)
18+
* [Avoid throwing JavaScript errors in nested C++ methods](#avoid-throwing-javascript-errors-in-nested-c-methods)
19+
320
Unfortunately, the C++ linter (based on
421
[Google’s `cpplint`](https://github.com/google/styleguide)), which can be run
522
explicitly via `make lint-cpp`, does not currently catch a lot of rules that are

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.