[#BloombergLP-bdlar-AnyCastUtil-toChoiceConstRef] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlar.adoc[bdlar]::xref:BloombergLP/bdlar/AnyCastUtil.adoc[AnyCastUtil]::toChoiceConstRef :relfileprefix: ../../../ :mrdocs: Cast the specified `any` to `ChoiceConstRef`. == Synopsis Declared in `<bdlar_anycastutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bdlar/ChoiceConstRef.adoc[ChoiceConstRef] toChoiceConstRef(xref:BloombergLP/bdlar/AnyConstRef.adoc[AnyConstRef] const& any); ---- == Description The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_CHOICE_CATEGORY`. == Return Value a `ChoiceConstRef` for the object referred to by `any` == Parameters [cols="1,4"] |=== | Name| Description | *any* | const any reference to cast |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#