[#BloombergLP-balxml-Decoder-decodeAny-05] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Decoder.adoc[Decoder]::decodeAny :relfileprefix: ../../../ :mrdocs: Decode into a type‐erased `bdlar::AnyRef` from the specified `buffer`. == Synopsis Declared in `<balxml_decoder.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> int decodeAny( std::streambuf* buffer, TYPE* object, char const* uri = 0); ---- == Description Decode `object` from `buffer` without instantiating templates. Decode the specified `object` of parameterized `TYPE` from the specified stream `buffer`. The (optionally) specified `uri` is used for identifying the input document in error messages. Return 0 on success, and a non‐zero value otherwise. A compilation error will result unless `TYPE` conforms to the requirements of a `bdlat` sequence or choice, as described in `bdlat_sequencefunctions` and `bdlat_choicefunctions`. Note that this function behaves identically to `decode`, but does not instantiate any templates at compile time at the expense of being slightly slower at runtime; see the `balxml` package documentation for more details. == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *buffer* | buffer providing XML data | *object* | object being decoded | *uri* | optional URI identifying the input document in error messages |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#