This struct provides a namespace for a static utility function that allows casting between function and data pointers.
Declared in <bsls_pointercastutil.h>
struct PointerCastUtil;
| Name | Description |
|---|---|
cast | Return the specified from value cast to TO_TYPE, casting it in two steps, first to an integer type the size of a pointer and then to the target type. This function is intended to be used to cast between function and data pointers, as doing such a cast directly was once illegal. The behavior is undefined unless both FROM_TYPE and TO_TYPE are not larger than the intermediate integer type. |