[#BloombergLP-bdlb-PrintMethods-print-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/PrintMethods.adoc[PrintMethods]::print
:relfileprefix: ../../../
:mrdocs:

`print` overloads

== Synopses

Declared in `&lt;bdlb&lowbar;printmethods&period;h&gt;`

Format the specified `object` to the specified output `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::ostream&
xref:BloombergLP/bdlb/PrintMethods/print-08.adoc[print](
    std::ostream& stream,
    char object,
    int level = 0,
    int spacesPerLevel = 4);
----

[.small]#xref:BloombergLP/bdlb/PrintMethods/print-08.adoc[_» more&period;&period;&period;_]#

Format the specified `object` to the specified output `stream`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::ostream&
xref:BloombergLP/bdlb/PrintMethods/print-0f.adoc[print](
    std::ostream& stream,
    unsigned char object,
    int level = 0,
    int spacesPerLevel = 4);
----

[.small]#xref:BloombergLP/bdlb/PrintMethods/print-0f.adoc[_» more&period;&period;&period;_]#

Format the specified `object` to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`&period; If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period; As all objects of this type have the same value, `object` is _ignored_ and a descriptive, human&hyphen;readable message is output for all objects of this type&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::ostream&
xref:BloombergLP/bdlb/PrintMethods/print-04e.adoc[print](
    std::ostream& stream,
    std::monostate const& object,
    int level = 0,
    int spacesPerLevel = 4);
----

[.small]#xref:BloombergLP/bdlb/PrintMethods/print-04e.adoc[_» more&period;&period;&period;_]#

Format the specified `object` to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`&period; If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
std::ostream&
xref:BloombergLP/bdlb/PrintMethods/print-049.adoc[print](
    std::ostream& stream,
    TYPE const& object,
    int level = 0,
    int spacesPerLevel = 4);
----

[.small]#xref:BloombergLP/bdlb/PrintMethods/print-049.adoc[_» more&period;&period;&period;_]#

Format the specified `object` to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`&period; If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period; A descriptive, human&hyphen;readable message, indented according to `level` and `spacesPerLevel`, is output for objects having no value (i&period;e&period;, `false &equals;&equals; object&period;has&lowbar;value()`)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
std::ostream&
xref:BloombergLP/bdlb/PrintMethods/print-0e.adoc[print](
    std::ostream& stream,
    std::optional&lt;TYPE&gt; const& object,
    int level = 0,
    int spacesPerLevel = 4);
----

[.small]#xref:BloombergLP/bdlb/PrintMethods/print-0e.adoc[_» more&period;&period;&period;_]#

Format the specified `object` to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to `stream`&period; If `level` is specified, optionally specify `spacesPerLevel`, the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period; A descriptive, human&hyphen;readable message, indented according to `level` and `spacesPerLevel`, is output for objects holding the value of type `std&colon;&colon;monostate`&period; Note that a `std&colon;&colon;variant` object can hold the `std&colon;&colon;monostate` value only if its template parameters explicitly mention the `std&colon;&colon;monostate` type&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class&period;&period;&period; TYPE&gt;
std::ostream&
xref:BloombergLP/bdlb/PrintMethods/print-062.adoc[print](
    std::ostream& stream,
    std::variant&lt;TYPE&period;&period;&period;&gt; const& object,
    int level = 0,
    int spacesPerLevel = 4);
----

[.small]#xref:BloombergLP/bdlb/PrintMethods/print-062.adoc[_» more&period;&period;&period;_]#

Format the specified `object` to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to stream&period; Note that output will be formatted on one line&period; Also note that non&hyphen;printable characters in `object` will be printed using their hexadecimal representation&period; If `stream` is not valid on entry, this operation has no effect&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOC&gt;
std::ostream&
xref:BloombergLP/bdlb/PrintMethods/print-02.adoc[print](
    std::ostream& stream,
    xref:bsl/vector-00d.adoc[bsl::vector&lt;char, ALLOC&gt;] const& object,
    int level = 0,
    int spacesPerLevel = 4);
----

[.small]#xref:BloombergLP/bdlb/PrintMethods/print-02.adoc[_» more&period;&period;&period;_]#

Format the specified `object` to the specified output `stream` at the (absolute value of) the optionally specified indentation `level` and return a reference to stream&period; Note that output will be formatted on one line&period; If `stream` is not valid on entry, this operation has no effect&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class CHAR&lowbar;T,
    class CHAR&lowbar;TRAITS&lowbar;T,
    class ALLOC&gt;
std::ostream&
xref:BloombergLP/bdlb/PrintMethods/print-06a.adoc[print](
    std::ostream& stream,
    xref:bsl/basic_string-0faf.adoc[bsl::basic&lowbar;string&lt;CHAR&lowbar;T, CHAR&lowbar;TRAITS&lowbar;T, ALLOC&gt;] const& object,
    int level = 0,
    int spacesPerLevel = 4);
----

[.small]#xref:BloombergLP/bdlb/PrintMethods/print-06a.adoc[_» more&period;&period;&period;_]#


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