-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inlined defer #311
Inlined defer #311
Conversation
11b5323
to
b470ea9
Compare
@@ -74,25 +74,25 @@ ptr_array_t<T> ptr_array(T* pbegin, size_t n) | |||
return {pbegin, pbegin + n}; | |||
} | |||
|
|||
#define __INLINE__ __attribute__((always_inline)) | |||
#define __FORCE_INLINE__ __INLINE__ inline | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering why force incline doesn't equal to always inline ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plain functions need the inline
keyword, otherwise the compiler will generates warnings. Whereas lambdas can not have inline
. So we have to have 2 macros. Maybe the wording can be improved.
make DEFER() always inline