[#BloombergLP-bsls-PointerCastUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::PointerCastUtil :relfileprefix: ../../ :mrdocs: This `struct` provides a namespace for a `static` utility function that allows casting between function and data pointers. == Synopsis Declared in `<bsls_pointercastutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct PointerCastUtil; ---- == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/PointerCastUtil/cast.adoc[`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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#