BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslmt::TestUtil Struct Reference

#include <bslmt_testutil.h>

Static Public Member Functions

template<class FUNCTION_PTR >
static FUNCTION_PTR makeFunctionCallNonInline (FUNCTION_PTR functionPtr)
 

Detailed Description

This struct provides a namespace for a suite of utility functions that facilitate the creation of BDE-style test drivers.

The callFunc function, because it's out-of-line implementation is in the .cpp file, can be used to prevent unwanted inlining in test drivers, particularly useful when testing the stack trace functionality.

Member Function Documentation

◆ makeFunctionCallNonInline()

template<class FUNCTION_PTR >
FUNCTION_PTR bslmt::TestUtil::makeFunctionCallNonInline ( FUNCTION_PTR  functionPtr)
inlinestatic

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 function and thus no way of inlining the call.


The documentation for this struct was generated from the following file: