Skip to content

Commit

Permalink
doc: add *-inl.h include rule to C++ style guide
Browse files Browse the repository at this point in the history
PR-URL: #16548
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>
  • Loading branch information
joyeecheung authored and gibfahn committed Oct 30, 2017
1 parent 13c03ff commit fc8acc8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CPP_STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,21 @@ class FancyContainer {
What it says in the title.
## Do not include `*.h` if `*-inl.h` has already been included
Do
```cpp
#include "util-inl.h" // already includes util.h
```

instead of

```cpp
#include "util.h"
#include "util-inl.h"
```

## Avoid throwing JavaScript errors in nested C++ methods

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

0 comments on commit fc8acc8

Please sign in to comment.