[#BloombergLP-bdlar-AnyCastUtil-toAnyConstRef-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlar.adoc[bdlar]::xref:BloombergLP/bdlar/AnyCastUtil.adoc[AnyCastUtil]::toAnyConstRef
:relfileprefix: ../../../
:mrdocs:

Cast the specified `ref` to `AnyConstRef`&period;

== Synopses

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

Cast the specified `ref` to `AnyConstRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlar/AnyConstRef.adoc[AnyConstRef]
xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-0b.adoc[toAnyConstRef](xref:BloombergLP/bdlar/ArrayConstRef.adoc[ArrayConstRef] const& ref);
----

[.small]#xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-0b.adoc[_» more&period;&period;&period;_]#

Cast the specified `ref` to `AnyConstRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlar/AnyConstRef.adoc[AnyConstRef]
xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-0c.adoc[toAnyConstRef](xref:BloombergLP/bdlar/ChoiceConstRef.adoc[ChoiceConstRef] const& ref);
----

[.small]#xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-0c.adoc[_» more&period;&period;&period;_]#

Cast the specified `ref` to `AnyConstRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlar/AnyConstRef.adoc[AnyConstRef]
xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-07.adoc[toAnyConstRef](xref:BloombergLP/bdlar/CustomizedTypeConstRef.adoc[CustomizedTypeConstRef] const& ref);
----

[.small]#xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-07.adoc[_» more&period;&period;&period;_]#

Cast the specified `ref` to `AnyConstRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlar/AnyConstRef.adoc[AnyConstRef]
xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-0f.adoc[toAnyConstRef](xref:BloombergLP/bdlar/DynamicTypeConstRef.adoc[DynamicTypeConstRef] const& ref);
----

[.small]#xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-0f.adoc[_» more&period;&period;&period;_]#

Cast the specified `ref` to `AnyConstRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlar/AnyConstRef.adoc[AnyConstRef]
xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-04.adoc[toAnyConstRef](xref:BloombergLP/bdlar/EnumConstRef.adoc[EnumConstRef] const& ref);
----

[.small]#xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-04.adoc[_» more&period;&period;&period;_]#

Cast the specified `ref` to `AnyConstRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlar/AnyConstRef.adoc[AnyConstRef]
xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-081.adoc[toAnyConstRef](xref:BloombergLP/bdlar/NullableValueConstRef.adoc[NullableValueConstRef] const& ref);
----

[.small]#xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-081.adoc[_» more&period;&period;&period;_]#

Cast the specified `ref` to `AnyConstRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlar/AnyConstRef.adoc[AnyConstRef]
xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-084.adoc[toAnyConstRef](xref:BloombergLP/bdlar/SequenceConstRef.adoc[SequenceConstRef] const& ref);
----

[.small]#xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-084.adoc[_» more&period;&period;&period;_]#

Cast the specified `ref` to `AnyConstRef`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlar/AnyConstRef.adoc[AnyConstRef]
xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-0a.adoc[toAnyConstRef](xref:BloombergLP/bdlar/SimpleTypeConstRef.adoc[SimpleTypeConstRef] const& ref);
----

[.small]#xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-0a.adoc[_» more&period;&period;&period;_]#

== Return Value

* an `AnyConstRef` for the array referred to by `ref`
* an `AnyConstRef` for the choice referred to by `ref`
* an `AnyConstRef` for the customized type referred to by `ref`
* an `AnyConstRef` for the dynamic type referred to by `ref`
* an `AnyConstRef` for the enumeration referred to by `ref`
* an `AnyConstRef` for the nullable value referred to by `ref`
* an `AnyConstRef` for the sequence referred to by `ref`
* an `AnyConstRef` for the simple type referred to by `ref`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ref*
| array const reference to wrap as `AnyConstRef`
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
