Can inline files (.inl) be included from a UE4 header file?
I'm trying to include an inline definition file (.inl), which of course needs to be included in the header after the class declaration. However UHT of course throws an error because its .generated header wasn't included last.
Is there any way to coerce UHT into letting this additional include go? (This error seems to be the result of a superfluous check which although helpful is not strictly required).
I realise that "tactically" I could simply put the inline definitions back into the header file, however this is a standard practice of working in C++; I'd really expect should be supported out-of-the-box. The reason why I'm doing it is that this specific file has a beefy set of inline method definitions, which really need to be broken out.
asked Jun 21 '17 at 01:56 PM in C++ Programming
If you find yourself in the same position as me then here's the answer. Surround the inline in an #if CPP preprocessor directive:
This way, it's ignored by UHT, but picked up by the compiler.
Follow this question
Once you sign in you will be able to subscribe for any updates here