[#bsl-Pair_Second-05b-2constructor-0c]
= xref:bsl.adoc[bsl]::xref:bsl/Pair_Second-05b.adoc[Pair&lowbar;Second&lt;TYPE&&&gt;]::Pair&lowbar;Second
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bslstl&lowbar;pair&period;h&gt;`

Bind to `second` the entity of (template parameter) `TYPE` that is bound to the `second` reference of `other`&period; Note that, unlike the primary template, these constructors must be declared and defaulted as the user&hyphen;declared copy&hyphen;assignment operator would inhibit the declaration of the move constructor, which in turn would mean that the implicitly declared constructors for the derived `pair` class would be just the copy constructor taking a `const` reference, even when the second element is move&hyphen;only&period; Declaring the move constructor deletes the copy constructor unless it too is declared and defaulted&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/Pair_Second-05b/2constructor-0f.adoc[Pair&lowbar;Second](xref:bsl/Pair_Second-05b.adoc[Pair&lowbar;Second] const&) = default;
----

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/Pair_Second-05b/2constructor-097.adoc[Pair&lowbar;Second](xref:bsl/Pair_Second-05b.adoc[Pair&lowbar;Second]&&) = default;
----

[.small]#xref:bsl/Pair_Second-05b/2constructor-097.adoc[_» more&period;&period;&period;_]#

Bind the specified `value` into the `second` reference&hyphen;member&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
explicit
xref:bsl/Pair_Second-05b/2constructor-0a.adoc[Pair&lowbar;Second](TYPE&& value);
----

[.small]#xref:bsl/Pair_Second-05b/2constructor-0a.adoc[_» more&period;&period;&period;_]#

Bind the specified &apos;value&apos; into the &apos;second&apos; reference&hyphen;member&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class PARAM,
    class = void&gt;
requires std&colon;&colon;is&lowbar;constructible&lt;TYPE, PARAM&gt;&colon;&colon;value
constexpr
explicit
xref:bsl/Pair_Second-05b/2constructor-03.adoc[Pair&lowbar;Second](PARAM&& value);
----

[.small]#xref:bsl/Pair_Second-05b/2constructor-03.adoc[_» more&period;&period;&period;_]#

Construct the `second` member of a `pair`, forwarding in order the elements in the specified `argsPack` to the corresponding constructor of (template parameter) `TYPE`&period; The length of the `argsPack` is equal to the length of the specified (template parameter pack) `I&period;&period;&period;` and passed to the constructor via the `Pair&lowbar;IndexSequence` object&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ARG&gt;
constexpr
xref:bsl/Pair_Second-05b/2constructor-099.adoc[Pair&lowbar;Second](
    std::tuple&lt;ARG&gt;&& arg,
    xref:BloombergLP/bslstl/Pair_IndexSequence.adoc[BloombergLP::bslstl::Pair&lowbar;IndexSequence&lt;0U&gt;]);
----

[.small]#xref:bsl/Pair_Second-05b/2constructor-099.adoc[_» more&period;&period;&period;_]#

Bind the specified &apos;value&apos; into the &apos;second&apos; reference&hyphen;member&period; The specified &apos;basicAllocator&apos; is not used&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class PARAM&gt;
constexpr
xref:bsl/Pair_Second-05b/2constructor-093.adoc[Pair&lowbar;Second](
    PARAM&& value,
    xref:BloombergLP/bslma/Allocator.adoc[BloombergLP::bslma::Allocator]* basicAllocator,
    xref:bsl/Pair_BslmaIdiomNone.adoc[Pair&lowbar;BslmaIdiomNone]);
----

[.small]#xref:bsl/Pair_Second-05b/2constructor-093.adoc[_» more&period;&period;&period;_]#


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