Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created September 27, 2011 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/724affcf0e0ea7d0b9ca to your computer and use it in GitHub Desktop.
Save bnoordhuis/724affcf0e0ea7d0b9ca to your computer and use it in GitHub Desktop.
#if defined(__GNUC__)
#define always_inline(type, name, ...) \
type __attribute__((always_inline)) name(__VA_ARGS__)
#elif defined(_MSC_VER)
#define always_inline(type, name, ...) \
__forceinline type name(__VA_ARGS__)
#else
#define always_inline(type, name, ...) \
type name(__VA_ARGS__)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment