what does it mean to use an inline function for a constructor? anyone have an example?
what does it mean to use an inline function for a constructor? anyone have an example?
an inline function is a regular function, nothing more. while regular functions are called with a "JMP" code, then "RET"urned to the next line, inline functions are copied, in their entirety, to the place which calls them
ie:
would becomeCode:void apple() { banana(); } void banana() { printf("%c is for cookie",'c'); }
Code:void apple() { printf("%c is for cookie",'c'); } inline void banana() { printf("%c is for cookie",'c'); }
Just to be pedantic, but for Intel and AMD chips the instruction to execute a function is a "CALL"...that call often goes to a jump table (often when an import table is used for a dll).....but a call is better used as it pushes the return address on the stack and without that, the "RET" instruction will send the thread of execution more or less anywhere...often ending in a crashOriginally posted by ygfperson
an inline function is a regular function, nothing more. while regular functions are called with a "JMP" code, then "RET"urned to the next line, inline functions are copied, in their entirety, to the place which calls them