[#absl-Hex-2constructor-0c0]
= xref:absl.adoc[absl]::xref:absl/Hex.adoc[Hex]::Hex
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;absl&sol;strings&sol;str&lowbar;cat&period;h&gt;`

Constructs a `Hex` from a 1&hyphen;byte integral value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Int&gt;
explicit
xref:absl/Hex/2constructor-0a.adoc[Hex](
    Int v,
    xref:absl/PadSpec.adoc[PadSpec] spec = absl&colon;&colon;kNoPad)
requires sizeof(Int) &equals;&equals; 1 &amp;&amp; !std&colon;&colon;is&lowbar;pointer&lowbar;v&lt;Int&gt;;
----

[.small]#xref:absl/Hex/2constructor-0a.adoc[_» more&period;&period;&period;_]#

Constructs a `Hex` from a 2&hyphen;byte integral value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Int&gt;
explicit
xref:absl/Hex/2constructor-05.adoc[Hex](
    Int v,
    xref:absl/PadSpec.adoc[PadSpec] spec = absl&colon;&colon;kNoPad)
requires sizeof(Int) &equals;&equals; 2 &amp;&amp; !std&colon;&colon;is&lowbar;pointer&lowbar;v&lt;Int&gt;;
----

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

Constructs a `Hex` from a 4&hyphen;byte integral value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Int&gt;
explicit
xref:absl/Hex/2constructor-06.adoc[Hex](
    Int v,
    xref:absl/PadSpec.adoc[PadSpec] spec = absl&colon;&colon;kNoPad)
requires sizeof(Int) &equals;&equals; 4 &amp;&amp; !std&colon;&colon;is&lowbar;pointer&lowbar;v&lt;Int&gt;;
----

[.small]#xref:absl/Hex/2constructor-06.adoc[_» more&period;&period;&period;_]#

Constructs a `Hex` from an 8&hyphen;byte integral value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Int&gt;
explicit
xref:absl/Hex/2constructor-08.adoc[Hex](
    Int v,
    xref:absl/PadSpec.adoc[PadSpec] spec = absl&colon;&colon;kNoPad)
requires sizeof(Int) &equals;&equals; 8 &amp;&amp; !std&colon;&colon;is&lowbar;pointer&lowbar;v&lt;Int&gt;;
----

[.small]#xref:absl/Hex/2constructor-08.adoc[_» more&period;&period;&period;_]#

Constructs a `Hex` from a pointer value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Pointee&gt;
explicit
xref:absl/Hex/2constructor-0cd.adoc[Hex](
    Pointee* v,
    xref:absl/PadSpec.adoc[PadSpec] spec = absl&colon;&colon;kNoPad);
----

[.small]#xref:absl/Hex/2constructor-0cd.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *v*
| The value to format as hexadecimal&period;
| *spec*
| The padding specification to apply&period;
|===


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