Page MenuHomePhabricator

Add .inl as valid C++ header type
Needs ReviewPublic

Authored by abbaswasim on Aug 30 2019, 3:53 PM.



clangd doesn't consider .inl a valid C++ source ( this pull request adds support for that.

Until the export keyword is supported by compilers mentioned a common way of keeping header files cleaner is to move template definitions into .inl files. This seems to be a common practice. Some evidence of it being commonly used for this purpose.
even brdf-loader

Some other ways of separating definitions is where they say you should use .inl or .impl or -inl.h or -impl.h and this might be ok but then things like projectile can't find it because that only works with extensions.

One caveat of this is, the above methods of using .inl files means its not a complete translation unit so clangd still can't fully compile it so one has to add #include "header.hpp" at the top of .inl files to make it work but thats not a big deal.

Event Timeline

abbaswasim created this revision.Aug 30 2019, 3:53 PM

Hi All,

I am not fully aware of the process here could anyone point me to what is the next step? Has anyone looked at this Patch?