Reputation: 11219
While browsing github I stumbled on "really_inline" keyword and I was wondering what is it exactly?
Obviously, if it lives by its name, it makes 100% sure to embed the function and remove the caller/callee in the assembly output, but I want to know if it is specific to any compiler or else and how is this done.
Upvotes: 1
Views: 252
Reputation: 69864
in this case it's a macro -- simdjson defines it conditionally on whether it is msvc:
here (msvc):
#define really_inline __forceinline
and here (not msvc):
#define really_inline inline __attribute__((always_inline, unused))
Upvotes: 3