diff --git a/CPP_STYLE_GUIDE.md b/CPP_STYLE_GUIDE.md index 3e7319c1f8e8f7..3bea5bb107586f 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