[#BloombergLP-bdlar-AnyCastUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlar.adoc[bdlar]::AnyCastUtil :relfileprefix: ../../ :mrdocs: This `struct` provides a namespace for functions that convert between `AnyRef`/`AnyConstRef` and the concrete type‐category reference types. == Synopsis Declared in `<bdlar_anycastutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct AnyCastUtil; ---- == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlar/AnyCastUtil/toAnyConstRef-03.adoc[`toAnyConstRef`] | Cast the specified `ref` to `AnyConstRef`. | xref:BloombergLP/bdlar/AnyCastUtil/toAnyRef-09.adoc[`toAnyRef`] | Cast the specified `ref` to `AnyRef`. | xref:BloombergLP/bdlar/AnyCastUtil/toArrayConstRef.adoc[`toArrayConstRef`] | Cast the specified `any` to `ArrayConstRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_ARRAY_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toArrayRef.adoc[`toArrayRef`] | Cast the specified `any` to `ArrayRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_ARRAY_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toChoiceConstRef.adoc[`toChoiceConstRef`] | Cast the specified `any` to `ChoiceConstRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_CHOICE_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toChoiceRef.adoc[`toChoiceRef`] | Cast the specified `any` to `ChoiceRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_CUSTOMIZED_TYPE_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toCustomizedTypeConstRef.adoc[`toCustomizedTypeConstRef`] | Cast the specified `any` to `CustomizedTypeConstRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_CUSTOMIZED_TYPE_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toCustomizedTypeRef.adoc[`toCustomizedTypeRef`] | Cast the specified `any` to `CustomizedTypeRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_CHOICE_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toDynamicTypeConstRef.adoc[`toDynamicTypeConstRef`] | Cast the specified `any` to `DynamicTypeConstRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_DYNAMIC_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toDynamicTypeRef.adoc[`toDynamicTypeRef`] | Cast the specified `any` to `DynamicTypeRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_DYNAMIC_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toEnumConstRef.adoc[`toEnumConstRef`] | Cast the specified `any` to `EnumConstRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_ENUMERATION_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toEnumRef.adoc[`toEnumRef`] | Cast the specified `any` to `EnumRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_ENUMERATION_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toNullableValueConstRef.adoc[`toNullableValueConstRef`] | Cast the specified `any` to `NullableValueConstRef`. The behaviour is undefined unless `any.typeCategory()==bdlat_TypeCategory::e_NULLABLE_VALUE_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toNullableValueRef.adoc[`toNullableValueRef`] | Cast the specified `any` to `NullableValueRef`. The behaviour is undefined unless `any.typeCategory()==bdlat_TypeCategory::e_NULLABLE_VALUE_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toSequenceConstRef.adoc[`toSequenceConstRef`] | Cast the specified `any` to `SequenceConstRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_SEQUENCE_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toSequenceRef.adoc[`toSequenceRef`] | Cast the specified `any` to `SequenceRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_SEQUENCE_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toSimpleTypeConstRef.adoc[`toSimpleTypeConstRef`] | Cast the specified `any` to `SimpleTypeConstRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_SIMPLE_CATEGORY`. | xref:BloombergLP/bdlar/AnyCastUtil/toSimpleTypeRef.adoc[`toSimpleTypeRef`] | Cast the specified `any` to `SimpleTypeRef`. The behaviour is undefined unless `any.typeCategory() == bdlat_TypeCategory::e_SIMPLE_CATEGORY`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#