You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why do we include both *-inl.h and *.h in the same .cc file? #16519
Just noticed this when doing #16122, clang-format has a different idea of alphabetical orders and put -inl.h includes before .h includes. Is there a reason that we include them both? Usually including -inl.h is enough because they should include .h as well, and they should be self-contained.
Activity
joyeecheung commentedon Oct 26, 2017
Also if there is a reason for that I think it's worth adding that to the C++ style guide, AFAICT this is different from how V8 includes stuff as well.
bnoordhuis commentedon Oct 26, 2017
No real reason. I think I introduced it in the node.js code base and I probably copied it from the V8 code base.
src: do not include x.h if x-inl.h is included
src: do not include x.h if x-inl.h is included
src: do not include x.h if x-inl.h is included
src: do not include x.h if x-inl.h is included
src: do not include x.h if x-inl.h is included
src: do not include x.h if x-inl.h is included
src: do not include x.h if x-inl.h is included
src: do not include x.h if x-inl.h is included
src: do not include x.h if x-inl.h is included
src: do not include x.h if x-inl.h is included