[#uint256-2constructor-09]
= xref:uint256.adoc[uint256]::uint256
:relfileprefix: ../
:mrdocs:

Constructors

== Synopses

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

Constructs a zero&hyphen;valued uint256&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
xref:uint256/2constructor-05.adoc[uint256]() = default;
----

[.small]#xref:uint256/2constructor-05.adoc[_» more&period;&period;&period;_]#

Constructs a uint256 at compile time from a hex string&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
consteval
explicit
xref:uint256/2constructor-07.adoc[uint256](std::string&lowbar;view hex&lowbar;str);
----

[.small]#xref:uint256/2constructor-07.adoc[_» more&period;&period;&period;_]#

Constructs a uint256 from a single byte constant between 1 and 255&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
explicit
xref:uint256/2constructor-0f.adoc[uint256](uint8&lowbar;t v);
----

[.small]#xref:uint256/2constructor-0f.adoc[_» more&period;&period;&period;_]#

Constructs a uint256 by copying bytes from a span&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
explicit
xref:uint256/2constructor-0d.adoc[uint256](std::span&lt;unsigned char const&gt; vch);
----

[.small]#xref:uint256/2constructor-0d.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *hex&lowbar;str*
| A hex string that must fit the 256&hyphen;bit blob exactly&period;
| *v*
| The byte value placed in the first position of the blob&period;
| *vch*
| A span of exactly 32 bytes to copy into the blob&period;
|===


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