|
|
|
|
|
by Buge
2499 days ago
|
|
While specifying inline alone is useless for optimization, the inline specifier is important for another type of optimization: putting a function in a header file. If you put a function in a header file and don't mark it inline, that tends to be undefined behavior because it tends to violate the One Definition Rule, (both C and C++). |
|
Ive usually encoutered this most when trying to implement out of line template member functions and forget to include the inline keyword.