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 a2fd9a3

Browse filesBrowse files
joyeecheunggibfahn
authored andcommitted
doc: add *-inl.h include rule to C++ style guide
PR-URL: #16548 Backport-PR-URL: #16609 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 255fffb commit a2fd9a3
Copy full SHA for a2fd9a3

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎CPP_STYLE_GUIDE.md‎

Copy file name to clipboardExpand all lines: CPP_STYLE_GUIDE.md
+15Lines changed: 15 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,21 @@ class FancyContainer {
127127
128128
What it says in the title.
129129
130+
## Do not include `*.h` if `*-inl.h` has already been included
131+
132+
Do
133+
134+
```cpp
135+
#include "util-inl.h" // already includes util.h
136+
```
137+
138+
instead of
139+
140+
```cpp
141+
#include "util.h"
142+
#include "util-inl.h"
143+
```
144+
130145
## Avoid throwing JavaScript errors in nested C++ methods
131146

132147
If you need to throw JavaScript errors from a C++ binding method, try to do it

0 commit comments

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