|
|
|
|
|
by Thorrez
977 days ago
|
|
>Conversely, programmers probably add "inline" as an incantation all over the place not knowing that compilers often ignore it. Funnily, the inline keyword actually has a use, but that use isn't to tell the compiler to inline a function. The use is to allow a function (or variable) to be defined in multiple translations units without being an ODR violation. |
|
[0] https://learn.microsoft.com/en-us/cpp/build/reference/ob-inl...
[1] https://gcc.gnu.org/onlinedocs/gcc/Inline.html
[2] https://clang.llvm.org/compatibility.html