[#BloombergLP-bdlat-EnumUtil-fromIntOrFallbackIfEnabled] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlat.adoc[bdlat]::xref:BloombergLP/bdlat/EnumUtil.adoc[EnumUtil]::fromIntOrFallbackIfEnabled :relfileprefix: ../../../ :mrdocs: Decode an enumeration from an integer, using a fallback if needed. == Synopsis Declared in `<bdlat_enumutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> static int fromIntOrFallbackIfEnabled( TYPE* result, int number); ---- == Description Load into the specified `result` the enumerator matching the specified `number` and return 0 if such an enumerator exists. Otherwise, if `result` supports a fallback enumerator, load into `result` the fallback enumerator value and return 0. Otherwise, return a non‐zero value with no effect on `result`. The behavior is undefined unless `TYPE` is a `bdlat` enumeration type. == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *result* | enumeration object to receive the decoded value | *number* | integral enumerator value to decode |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#