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 <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
joyeecheung committed Oct 30, 2017
1 parent cdb263d commit ab2c351
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 ab2c351

Please sign in to comment.