+ 5
What is inline function
2 ответов
+ 11
Inline function is powerful concept that is commonly used with classes. If a function is inline, the compiler places a copy of the code of that function at each point where thefunction is called at compile time.
The compiler can ignore the inlinequalifier in case defined function is more than a line.
https://www.tutorialspoint.com/cplusplus/cpp_inline_functions.htm
+ 3
" Inline function is a function that is expanded in line when it is called. When the inline function is called whole code of the inline function gets inserted or substituted at the point of inline function call. This substitution is performed by the C++ compiler at compile time. Inline function may increase efficiency if it is small.
..."
Source: https://www.geeksforgeeks.org/inline-functions-cpp/