What's the advantage of NS_INLINE over static inline?
cocoa, inline, objective-c, static
Solution
Yes, it's for compiler compatibility, but I think it's more for the use of the frameworks than for your own code. You're free to use it, of course, but I wouldn't bother.
Problem
Looking at the define of `NS_INLINE` it seems that the advantage of using it over `static inline` is compiler compatibility, is that correct? Should `NS_INLINE` always be used instead of `static inline` on c functions in objective-c projects? ``` #if !defined(NS_INLINE) #if defined(__GNUC__) #define NS_INLINE static __inline__ __attribute__((always_inline)) #elif defined(__MWERKS__) || defined(__cplusplus) #define NS_INLINE static inline #elif defined(_MSC_VER) #define NS_INLINE static __inline #elif TARGET_OS_WIN32 #define NS_INLINE static __inline__ #endif #endif ```