[#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`&period;

== Synopsis

Declared in `&lt;bdlar&lowbar;anycastutil&period;h&gt;`

[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&period;typeCategory() &equals;&equals; bdlat&lowbar;TypeCategory&colon;&colon;e&lowbar;CHOICE&lowbar;CATEGORY`&period;

== 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]#
