[#Unserialize-004]
= Unserialize
:mrdocs:

`Unserialize` overloads

== Synopses

Declared in `&lt;serialize&period;h&gt;`

Unserialize a boolean from a single byte in a stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
void
xref:Unserialize-0ff.adoc[Unserialize](
    Stream& s,
    bool& a);
----

[.small]#xref:Unserialize-0ff.adoc[_» more&period;&period;&period;_]#

Unserialize a byte from a stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
void
xref:Unserialize-0f8.adoc[Unserialize](
    Stream& s,
    std::byte& a);
----

[.small]#xref:Unserialize-0f8.adoc[_» more&period;&period;&period;_]#

Unserialize a signed 16&hyphen;bit little&hyphen;endian integer from a stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
void
xref:Unserialize-02.adoc[Unserialize](
    Stream& s,
    int16&lowbar;t& a);
----

[.small]#xref:Unserialize-02.adoc[_» more&period;&period;&period;_]#

Unserialize a signed 32&hyphen;bit little&hyphen;endian integer from a stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
void
xref:Unserialize-0af.adoc[Unserialize](
    Stream& s,
    int32&lowbar;t& a);
----

[.small]#xref:Unserialize-0af.adoc[_» more&period;&period;&period;_]#

Unserialize a signed 64&hyphen;bit little&hyphen;endian integer from a stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
void
xref:Unserialize-07.adoc[Unserialize](
    Stream& s,
    int64&lowbar;t& a);
----

[.small]#xref:Unserialize-07.adoc[_» more&period;&period;&period;_]#

Unserialize a signed 8&hyphen;bit integer from a stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
void
xref:Unserialize-0ba.adoc[Unserialize](
    Stream& s,
    int8&lowbar;t& a);
----

[.small]#xref:Unserialize-0ba.adoc[_» more&period;&period;&period;_]#

Unserialize an unsigned 16&hyphen;bit little&hyphen;endian integer from a stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
void
xref:Unserialize-01c.adoc[Unserialize](
    Stream& s,
    uint16&lowbar;t& a);
----

[.small]#xref:Unserialize-01c.adoc[_» more&period;&period;&period;_]#

Unserialize an unsigned 32&hyphen;bit little&hyphen;endian integer from a stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
void
xref:Unserialize-0aa.adoc[Unserialize](
    Stream& s,
    uint32&lowbar;t& a);
----

[.small]#xref:Unserialize-0aa.adoc[_» more&period;&period;&period;_]#

Unserialize an unsigned 64&hyphen;bit little&hyphen;endian integer from a stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
void
xref:Unserialize-05.adoc[Unserialize](
    Stream& s,
    uint64&lowbar;t& a);
----

[.small]#xref:Unserialize-05.adoc[_» more&period;&period;&period;_]#

Unserialize an unsigned 8&hyphen;bit integer from a stream&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Stream&gt;
void
xref:Unserialize-04.adoc[Unserialize](
    Stream& s,
    uint8&lowbar;t& a);
----

[.small]#xref:Unserialize-04.adoc[_» more&period;&period;&period;_]#

Unserialize a string written as a CompactSize length followed by its bytes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    typename C&gt;
void
xref:Unserialize-08a.adoc[Unserialize](
    Stream& is,
    std::basic&lowbar;string&lt;C&gt;& str);
----

[.small]#xref:Unserialize-08a.adoc[_» more&period;&period;&period;_]#

Deleted&colon; a string view cannot own storage to unserialize into&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    typename C&gt;
void
xref:Unserialize-0d63.adoc[Unserialize](
    Stream& is,
    std::basic&lowbar;string&lowbar;view&lt;C&gt;& str) = delete;
----

[.small]#xref:Unserialize-0d63.adoc[_» more&period;&period;&period;_]#

Unserialize any object that provides an Unserialize member function&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    typename T&gt;
requires Unserializable&lt;T, Stream&gt;
void
xref:Unserialize-09.adoc[Unserialize](
    Stream& is,
    T&& a);
----

[.small]#xref:Unserialize-09.adoc[_» more&period;&period;&period;_]#

Unserialize into a newly constructed object owned by a shared&lowbar;ptr&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    typename T&gt;
void
xref:Unserialize-0e.adoc[Unserialize](
    Stream& os,
    std::shared&lowbar;ptr&lt;T const&gt;& p);
----

[.small]#xref:Unserialize-0e.adoc[_» more&period;&period;&period;_]#

Unserialize into a newly constructed object owned by a unique&lowbar;ptr&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    typename T&gt;
void
xref:Unserialize-01b.adoc[Unserialize](
    Stream& os,
    std::unique&lowbar;ptr&lt;T const&gt;& p);
----

[.small]#xref:Unserialize-01b.adoc[_» more&period;&period;&period;_]#

Deleted overload that forbids unserializing char&semi; use uint8&lowbar;t or int8&lowbar;t instead&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    xref:CharNotInt8.adoc[CharNotInt8] V&gt;
void
xref:Unserialize-0a9.adoc[Unserialize](
    Stream& s,
    V v) = delete;
----

[.small]#xref:Unserialize-0a9.adoc[_» more&period;&period;&period;_]#

Unserialize a dynamic&hyphen;extent span of basic bytes from raw bytes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    xref:BasicByte.adoc[BasicByte] B&gt;
void
xref:Unserialize-0c8.adoc[Unserialize](
    Stream& s,
    std::span&lt;B&gt; span);
----

[.small]#xref:Unserialize-0c8.adoc[_» more&period;&period;&period;_]#

Unserialize a pair as its first then second element&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    typename K,
    typename T&gt;
void
xref:Unserialize-03.adoc[Unserialize](
    Stream& is,
    std::pair&lt;K, T&gt;& item);
----

[.small]#xref:Unserialize-03.adoc[_» more&period;&period;&period;_]#

Unserialize a prevector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    unsigned int N,
    typename T&gt;
void
xref:Unserialize-0bf.adoc[Unserialize](
    Stream& is,
    xref:prevector-0c.adoc[prevector&lt;N, T&gt;]& v);
----

[.small]#xref:Unserialize-0bf.adoc[_» more&period;&period;&period;_]#

Unserialize a vector&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    typename T,
    typename A&gt;
void
xref:Unserialize-0cc.adoc[Unserialize](
    Stream& is,
    std::vector&lt;T, A&gt;& v);
----

[.small]#xref:Unserialize-0cc.adoc[_» more&period;&period;&period;_]#

Unserialize a fixed&hyphen;extent span of basic bytes from raw bytes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    xref:BasicByte.adoc[BasicByte] B,
    size&lowbar;t N&gt;
void
xref:Unserialize-0d61.adoc[Unserialize](
    Stream& s,
    std::span&lt;B, N&gt; span);
----

[.small]#xref:Unserialize-0d61.adoc[_» more&period;&period;&period;_]#

Unserialize a std&colon;&colon;array of basic bytes from raw bytes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    xref:BasicByte.adoc[BasicByte] B,
    size&lowbar;t N&gt;
void
xref:Unserialize-088.adoc[Unserialize](
    Stream& s,
    std::array&lt;B, N&gt;& a);
----

[.small]#xref:Unserialize-088.adoc[_» more&period;&period;&period;_]#

Unserialize a C array of basic bytes from raw bytes&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    xref:BasicByte.adoc[BasicByte] B,
    size&lowbar;t N&gt;
void
xref:Unserialize-00a.adoc[Unserialize](
    Stream& s,
    B(& a)[]);
----

[.small]#xref:Unserialize-00a.adoc[_» more&period;&period;&period;_]#

Unserialize a set written as a CompactSize count followed by its elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    typename K,
    typename Pred,
    typename A&gt;
void
xref:Unserialize-0d1.adoc[Unserialize](
    Stream& is,
    std::set&lt;K, Pred, A&gt;& m);
----

[.small]#xref:Unserialize-0d1.adoc[_» more&period;&period;&period;_]#

Unserialize a map written as a CompactSize count followed by its entries&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Stream,
    typename K,
    typename T,
    typename Pred,
    typename A&gt;
void
xref:Unserialize-017.adoc[Unserialize](
    Stream& is,
    std::map&lt;K, T, Pred, A&gt;& m);
----

[.small]#xref:Unserialize-017.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| The input stream&period;
| *a*
| The boolean value to read into&period;
| *is*
| The input stream&period;
| *str*
| The string to fill&period;
| *os*
| The input stream&period;
| *p*
| The shared pointer to populate&period;
| *v*
| The char value that must not be unserialized&period;
| *span*
| The span of bytes to read into&period;
| *item*
| The pair to fill&period;
| *m*
| The set to fill&period;
|===


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