[#BloombergLP-balber-BerEncoder-encodeAny-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerEncoder.adoc[BerEncoder]::encodeAny
:relfileprefix: ../../../
:mrdocs:

`encodeAny` overloads

== Synopses

Declared in `&lt;balber&lowbar;berencoder&period;h&gt;`

Encode the specified `any` to the specified `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/balber/BerEncoder/encodeAny-0f.adoc[encodeAny](
    std::ostream& stream,
    xref:BloombergLP/bdlar/AnyConstRef.adoc[bdlar::AnyConstRef] const& any);
----

[.small]#xref:BloombergLP/balber/BerEncoder/encodeAny-0f.adoc[_» more&period;&period;&period;_]#

Encode the specified `any` to the specified `streamBuf`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/balber/BerEncoder/encodeAny-02.adoc[encodeAny](
    std::streambuf* streamBuf,
    xref:BloombergLP/bdlar/AnyConstRef.adoc[bdlar::AnyConstRef] const& any);
----

[.small]#xref:BloombergLP/balber/BerEncoder/encodeAny-02.adoc[_» more&period;&period;&period;_]#

Encode the specified non&hyphen;modifiable `value` to the specified `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename TYPE&gt;
int
xref:BloombergLP/balber/BerEncoder/encodeAny-0a.adoc[encodeAny](
    std::ostream& stream,
    TYPE const& value);
----

[.small]#xref:BloombergLP/balber/BerEncoder/encodeAny-0a.adoc[_» more&period;&period;&period;_]#

Encode the specified non&hyphen;modifiable `value` to the specified `streamBuf`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename TYPE&gt;
int
xref:BloombergLP/balber/BerEncoder/encodeAny-0c.adoc[encodeAny](
    std::streambuf* streamBuf,
    TYPE const& value);
----

[.small]#xref:BloombergLP/balber/BerEncoder/encodeAny-0c.adoc[_» more&period;&period;&period;_]#

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *stream*
| output stream
| *any*
| type&hyphen;erased value to encode
| *streamBuf*
| output stream buffer
| *value*
| value to encode
|===


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