Closed HansOlsson closed 2 months ago
Sometimes, the complete function definition is given inline in the Include annotation. Then, separate compiling and then linking together can be useful.
Need more clear condition for when to include the header for
size_t
.
Is there some remaining issue? @henrikt-ma
Sorry, I'm just a little short of time to stay on top of issues all the time.
It wasn't completely clear that the proposed code fragment was more than just the
insertedCode
, and I find it better to speak of a valid translation unit than about code fragments. We already describe things in terms of translation units when it comes to the case of multiple external functions inserted into the same translation unit, so it's just a matter of not deviating from that concept here.
Ok. done
Closes #3456
Note that I realized that there is one minor problem with the discussion in #3456 - compiling only the include-part on its own doesn't make much sense as it is intended to be a header-definition of the external function, as the call of the function is missing!
I believe the current text still works for this case:
#include "code.h"
first incode.cpp
to ensure that the header doesn't depend on any other header-files.