Return the specified functionPtr (expected to be a static function pointer) without modification. The value of functionPtr is transformed through identityPtr so that if the caller is in a different module, the compiler will have no way of knowing that this is an identity transform and thus no way of inlining the call.
Synopsis
Declared in <bsls_bsltestutil.h>
template<class FUNCTION_PTR>
static
FUNCTION_PTR
makeFunctionCallNonInline(FUNCTION_PTR functionPtr);
Description
Note: the Windows optimizer is still able to inline the call, it may be comparing the result of this function with the argument and branching to inline on equality and call on inequality, so the Windows optimizer has to be turned off with # pragma optimize("", off).
Also note that even with an optimizer that can't figure out that this is an identity transform, there is still the possibility of chaining the call.
Created with MrDocs