c++ - What happens if compiler inlines a function which is called through a function pointer -
c++ - What happens if compiler inlines a function which is called through a function pointer -
let have function in programme , somewhere in code, function called through function pointer. happens if compiler happened inline function, or compiler realize there function pointer assigned function , hence avoid inlining it.
when pointer function taken, compiler generate out-of-line body function. still possible inline function @ other phone call sites.
note function marked inline
must have definition available in tus refer it, , these definitions must identical. means it's safe inline function @ phone call sites , maintain out-of-line @ others.
c++ c compiler-construction
Comments
Post a Comment