Pergunta de entrevista da empresa Jump Trading

What does inline keyword in C++ do?

Respostas da entrevista

Sigiloso

21 de out. de 2020

The inline keyword rarely does anything in C++. It is mainly used to specify inline linkage, meaning the linker should ignore multiple definitions of a function, instead of raising a linker error. Most modern compilers completely ignore inline keyword when deciding whether a function should be inlined.

Sigiloso

24 de mar. de 2020

Allows C++ to avoid function call overhead by defining the function inline.