Skip to content

Conversation

@duncan-roe
Copy link
Contributor

Same as #11345 except PR is a single commit

@albert-github albert-github added enhancement a request to enhance doxygen, not a bug documentation bug in the documentation labels Mar 4, 2025
@doxygen
Copy link
Owner

doxygen commented Mar 4, 2025

@duncan-roe Sorry for reacting late, but I'm not really sure which problem you are addressing. Is this for C code? An inline function in C++ does not need to be static. I don't think this is a frequently asked question (I don't remember it being asked before).

@duncan-roe
Copy link
Contributor Author

Yes for C. An inline function declared in a header has to be static else ld complains (the 2nd time the header is included IIRC). static inline is absolutely the normal way to declare public inline functions - see for example the Linux source tree.
I do think it's worth documenting how to deal with static inline functions.
In #11339 I had this documentation as a config example, but @albert-github suggested to make it an FAQ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation bug in the documentation enhancement a request to enhance doxygen, not a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants