cpp-optimizations/01-inline-functions/inline.cpp

13 lines
158 B
C++
Raw Permalink Normal View History

2022-05-06 09:29:09 +00:00
#include <cstdlib>
2022-05-23 09:47:04 +00:00
inline int __attribute__((always_inline)) sum(int a, int b)
2022-05-06 09:29:09 +00:00
{
2022-05-23 09:47:04 +00:00
return a + b;
2022-05-06 09:29:09 +00:00
}
2022-05-23 09:47:04 +00:00
int main()
2022-05-06 09:29:09 +00:00
{
2022-05-23 09:47:04 +00:00
int aux = sum(7,9);
2022-05-06 09:29:09 +00:00
return EXIT_SUCCESS;
}