[#bsl-pair-0b-2constructor-099e]
= xref:bsl.adoc[bsl]::xref:bsl/pair-0b.adoc[pair]::pair
:relfileprefix: ../../
:mrdocs:

Construct a `pair` from the specified `a` and `b` values&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
pair(
    bsl::add&lowbar;lvalue&lowbar;reference&lt;T1 const&gt;::type a,
    bsl::add&lowbar;lvalue&lowbar;reference&lt;T2 const&gt;::type b);
----

== Description

Construct a `pair` with the `first` member initialized to the specified `a` value and the `second` member initialized to the specified `b` value&period; Optionally specify a `basicAllocator`, used to supply memory for each of `first` and `second` when its type (template parameter `T1` or `T2`, respectively) uses `bslma`&hyphen;style allocators&period; This method requires that `T1` and `T2` be `copy&hyphen;constructible`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| value copied into the `first` member
| *b*
| value copied into the `second` member
|===


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