doc: add *-inl.h include rule to C++ style guide
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
cdb263d3ba
commit
ab2c35100f
@ -127,6 +127,21 @@ class FancyContainer {
|
|||||||
|
|
||||||
What it says in the title.
|
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
|
## Avoid throwing JavaScript errors in nested C++ methods
|
||||||
|
|
||||||
If you need to throw JavaScript errors from a C++ binding method, try to do it
|
If you need to throw JavaScript errors from a C++ binding method, try to do it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user