If I put an inline function in a .h file, then include that in the bridging header, can I invoke it in Swift? (Answer: Yes) But will it still be inline when invoked in Swift?
Asked
Active
Viewed 269 times
1 Answers
2
The compiler will do what it wants but generally the answer is yes. This is part of why the atomics libraries and math shims that go down to C use header only inlined modules. So at least in release builds it can be fully optimized.
See this for example.

user16217248
- 3,119
- 19
- 19
- 37

bscothern
- 1,894
- 11
- 15