summaryrefslogtreecommitdiff
path: root/CPP_STYLE_GUIDE.md
diff options
context:
space:
mode:
Diffstat (limited to 'CPP_STYLE_GUIDE.md')
-rw-r--r--CPP_STYLE_GUIDE.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/CPP_STYLE_GUIDE.md b/CPP_STYLE_GUIDE.md
index 3e7319c1f8..3bea5bb107 100644
--- a/CPP_STYLE_GUIDE.md
+++ b/CPP_STYLE_GUIDE.md
@@ -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