BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bsl::pair< T1, T2 > Class Template Reference

#include <bslstl_pair.h>

Inheritance diagram for bsl::pair< T1, T2 >:
bsl::Pair_First< T1 > bsl::Pair_Second< T2 >

Detailed Description

template<class T1, class T2>
class bsl::pair< T1, T2 >

The class template pair provides a pair of public data members, first and second, of type T1 and T2 respectively. If either T1 or T2 uses bslma::Allocator for memory management, then provide an optional bslma::Allocator argument for each constructor, to be passed through to the constructors of first and/or second as appropriate. The interface to this class is identical to the standard std::pair except for the addition of the allocators.

Note
Note that the implementation of this class provides first and second through multiple base classes in order to simplify construction of each member when allowing for the various rules for passing allocators in C++11.

See bslstl_pair

Public Types

typedef T1 first_type
 
typedef T2 second_type
 

Public Member Functions

 pair ()
 
 pair (BloombergLP::bslma::Allocator *basicAllocator)
 
 pair (const pair &)=default
 
 pair (const pair &original, BloombergLP::bslma::Allocator *basicAllocator)
 
 pair (BloombergLP::bslmf::MovableRef< pair > original)
 
 pair (BloombergLP::bslmf::MovableRef< pair > original, BloombergLP::bslma::Allocator *basicAllocator)
 
BSLS_KEYWORD_CONSTEXPR pair (typename bsl::add_lvalue_reference< const T1 >::type a, typename bsl::add_lvalue_reference< const T2 >::type b)
 
 pair (typename bsl::add_lvalue_reference< const T1 >::type a, typename bsl::add_lvalue_reference< const T2 >::type b, BloombergLP::bslma::Allocator *basicAllocator)
 
template<class PARAM_1 , class PARAM_2 >
 pair (const PARAM_1 &a, const PARAM_2 &b, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type=SfinaeEnable())
 
template<class PARAM_1 , class PARAM_2 >
 pair (const PARAM_1 &a, const PARAM_2 &b, BloombergLP::bslma::Allocator *basicAllocator)
 
template<class PARAM_1 , class PARAM_2 >
 pair (PARAM_1 &a, const PARAM_2 &b, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type=SfinaeEnable())
 
template<class PARAM_1 , class PARAM_2 >
 pair (PARAM_1 &a, const PARAM_2 &b, BloombergLP::bslma::Allocator *basicAllocator)
 
template<class PARAM_1 , class PARAM_2 >
 pair (const PARAM_1 &a, PARAM_2 &b, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type=SfinaeEnable())
 
template<class PARAM_1 , class PARAM_2 >
 pair (const PARAM_1 &a, PARAM_2 &b, BloombergLP::bslma::Allocator *basicAllocator)
 
template<class PARAM_1 , class PARAM_2 >
 pair (PARAM_1 &a, PARAM_2 &b, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type=SfinaeEnable())
 
template<class PARAM_1 , class PARAM_2 >
 pair (PARAM_1 &a, PARAM_2 &b, BloombergLP::bslma::Allocator *basicAllocator)
 
template<class PARAM_1 , class PARAM_2 >
 pair (const pair< PARAM_1, PARAM_2 > &other)
 
template<class PARAM_1 , class PARAM_2 >
 pair (const std::pair< PARAM_1, PARAM_2 > &other)
 
template<class PARAM_1 , class PARAM_2 >
 pair (const pair< PARAM_1, PARAM_2 > &other, BloombergLP::bslma::Allocator *basicAllocator)
 
template<class PARAM_1 , class PARAM_2 >
 pair (const std::pair< PARAM_1, PARAM_2 > &other, BloombergLP::bslma::Allocator *basicAllocator)
 
template<class PARAM_1 , class PARAM_2 >
 pair (BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > > other, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value, SfinaeEnable >::type=SfinaeEnable())
 
template<class PARAM_1 , class PARAM_2 >
 pair (BloombergLP::bslmf::MovableRef< std::pair< PARAM_1, PARAM_2 > > other, typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value, SfinaeEnable >::type=SfinaeEnable())
 
template<class PARAM_1 , class PARAM_2 >
 pair (BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > > other, BloombergLP::bslma::Allocator *basicAllocator)
 
template<class PARAM_1 , class PARAM_2 >
 pair (BloombergLP::bslmf::MovableRef< std::pair< PARAM_1, PARAM_2 > > other, BloombergLP::bslma::Allocator *basicAllocator)
 
template<class PARAM_1 , class PARAM_2 >
BSLS_KEYWORD_CONSTEXPR pair (const BloombergLP::bslma::ManagedPtr_PairProxy< PARAM_1, PARAM_2 > &rhs)
 
 ~pair ()=default
 
pairoperator= (const pair &rhs)=default
 
template<class PARAM_1 , class PARAM_2 >
pairoperator= (const pair< PARAM_1, PARAM_2 > &rhs)
 
template<class PARAM_1 , class PARAM_2 >
BSLS_KEYWORD_CONSTEXPR_CPP14 pairoperator= (const std::pair< PARAM_1, PARAM_2 > &rhs)
 
pairoperator= (BloombergLP::bslmf::MovableRef< pair > rhs)
 
template<class PARAM_1 , class PARAM_2 >
pairoperator= (BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > > rhs)
 
template<class PARAM_1 , class PARAM_2 >
pair< T1, T2 > & operator= (const pair< PARAM_1, PARAM_2 > &rhs)
 
template<class PARAM_1 , class PARAM_2 >
pair< T1, T2 > & operator= (BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > > rhs)
 
template<class PARAM_1 , class PARAM_2 >
BSLS_KEYWORD_CONSTEXPR_CPP14 pair< T1, T2 > & operator= (const std::pair< PARAM_1, PARAM_2 > &rhs)
 

Additional Inherited Members

- Protected Member Functions inherited from bsl::Pair_First< T1 >
 Pair_First (const Pair_First &)=default
 
 Pair_First (Pair_First &&)=default
 
 Pair_First ()
 
 Pair_First (BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
 
 Pair_First (BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
 
 Pair_First (BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
 
BSLS_KEYWORD_CONSTEXPR Pair_First (typename bsl::add_lvalue_reference< const T1 >::type value)
 
 Pair_First (const PARAM &value)
 
 Pair_First (PARAM &value)
 
 Pair_First (const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
 
 Pair_First (PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
 
 Pair_First (const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
 
 Pair_First (PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
 
 Pair_First (const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
 
 Pair_First (PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
 
Pair_Firstoperator= (const Pair_First &)=default
 
Pair_Firstoperator= (Pair_First &&)=default
 
 ~Pair_First ()=default
 
- Protected Member Functions inherited from bsl::Pair_Second< T2 >
 Pair_Second (const Pair_Second &)=default
 
 Pair_Second (Pair_Second &&)=default
 
 Pair_Second ()
 
 Pair_Second (BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
 
 Pair_Second (BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
 
 Pair_Second (BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
 
BSLS_KEYWORD_CONSTEXPR Pair_Second (typename bsl::add_lvalue_reference< const T2 >::type value)
 
 Pair_Second (const PARAM &value)
 
 Pair_Second (PARAM &value)
 
 Pair_Second (const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
 
 Pair_Second (PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomNone)
 
 Pair_Second (const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
 
 Pair_Second (PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAtEnd)
 
 Pair_Second (const PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
 
 Pair_Second (PARAM &value, BloombergLP::bslma::Allocator *basicAllocator, Pair_BslmaIdiomAllocatorArgT)
 
Pair_Secondoperator= (const Pair_Second &)=default
 
Pair_Secondoperator= (Pair_Second &&)=default
 
 ~Pair_Second ()=default
 
- Protected Attributes inherited from bsl::Pair_First< T1 >
T1 first
 
- Protected Attributes inherited from bsl::Pair_Second< T2 >
T2 second
 

Member Typedef Documentation

◆ first_type

template<class T1 , class T2 >
typedef T1 bsl::pair< T1, T2 >::first_type

◆ second_type

template<class T1 , class T2 >
typedef T2 bsl::pair< T1, T2 >::second_type

Constructor & Destructor Documentation

◆ pair() [1/25]

template<class T1 , class T2 >
bsl::pair< T1, T2 >::pair ( )
inline

Construct a pair with the first and second members initialized to default values. 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-style allocators. This method requires that T1 and T2 be default-constructible.

◆ pair() [2/25]

template<class T1 , class T2 >
bsl::pair< T1, T2 >::pair ( BloombergLP::bslma::Allocator *  basicAllocator)
inlineexplicit

◆ pair() [3/25]

template<class T1 , class T2 >
bsl::pair< T1, T2 >::pair ( const pair< T1, T2 > &  )
default

The copy constructor is declared implicitly, and will be implicitly deleted if either T1 or T2 have inaccessible or deleted copy constructors. If either (template) type parameters, T1 or T2, has a copy constructor that is declared to take TYPE& rather than const TYPE & then this constructor will be declared with a pair & parameter; otherwise this constructor will be declared with a const pair & argument. This constructor is trivial if both (template) type parameters T1 and T2 have trivial copy constructors.

◆ pair() [4/25]

template<class T1 , class T2 >
bsl::pair< T1, T2 >::pair ( const pair< T1, T2 > &  original,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

Construct a pair having the same value as that of the specified original pair. 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-style allocators.

Note
Note that the copy constructor is implicitly declared (if T1 and T2 are both copy-constructible) by compilers that do not support defaulted declarations.

◆ pair() [5/25]

template<class T1 , class T2 >
bsl::pair< T1, T2 >::pair ( BloombergLP::bslmf::MovableRef< pair< T1, T2 > >  original)
inline

Construct a pair having the same value as that of the specified original before the call to the move constructor. 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-style allocators.

Note
Note that original is left in a valid but unspecified state. Also note that this method requires that T1 and T2 be move-constructible.

◆ pair() [6/25]

template<class T1 , class T2 >
bsl::pair< T1, T2 >::pair ( BloombergLP::bslmf::MovableRef< pair< T1, T2 > >  original,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

◆ pair() [7/25]

template<class T1 , class T2 >
BSLS_KEYWORD_CONSTEXPR bsl::pair< T1, T2 >::pair ( typename bsl::add_lvalue_reference< const T1 >::type  a,
typename bsl::add_lvalue_reference< const T2 >::type  b 
)
inline

Construct a pair with the first member initialized to the specified a value and the second member initialized to the specified b value. 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-style allocators. This method requires that T1 and T2 be copy-constructible.

◆ pair() [8/25]

template<class T1 , class T2 >
bsl::pair< T1, T2 >::pair ( typename bsl::add_lvalue_reference< const T1 >::type  a,
typename bsl::add_lvalue_reference< const T2 >::type  b,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

◆ pair() [9/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( const PARAM_1 &  a,
const PARAM_2 &  b,
typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type  = SfinaeEnable() 
)
inline

Construct a pair with the 'first' member initialized to the specified 'a' value of (template parameter) type 'PARAM_1' and the 'second' member initialized to the specified 'b' value of (template parameter) type 'PARAM_2'. 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'-style allocators. This method requires that 'T1' and 'T2' be convertible from 'PARAM_1' and 'PARAM_2', respectively.

◆ pair() [10/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( const PARAM_1 &  a,
const PARAM_2 &  b,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

◆ pair() [11/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( PARAM_1 &  a,
const PARAM_2 &  b,
typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type  = SfinaeEnable() 
)
inline

◆ pair() [12/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( PARAM_1 &  a,
const PARAM_2 &  b,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

◆ pair() [13/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( const PARAM_1 &  a,
PARAM_2 &  b,
typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type  = SfinaeEnable() 
)
inline

◆ pair() [14/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( const PARAM_1 &  a,
PARAM_2 &  b,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

◆ pair() [15/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( PARAM_1 &  a,
PARAM_2 &  b,
typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value &&!(bsl::is_pointer< typename bsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), SfinaeEnable >::type  = SfinaeEnable() 
)
inline

◆ pair() [16/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( PARAM_1 &  a,
PARAM_2 &  b,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

◆ pair() [17/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( const pair< PARAM_1, PARAM_2 > &  other)
inline

Construct a pair from the specified other pair, holding first and second values of (template parameter) type PARAM_1 and PARAM_2 respectively. 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-style allocators. This method requires that T1 and T2 be convertible from PARAM_1 and PARAM_2, respectively.

◆ pair() [18/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( const std::pair< PARAM_1, PARAM_2 > &  other)
inline

◆ pair() [19/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( const pair< PARAM_1, PARAM_2 > &  other,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

◆ pair() [20/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( const std::pair< PARAM_1, PARAM_2 > &  other,
BloombergLP::bslma::Allocator *  basicAllocator 
)
inline

◆ pair() [21/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > >  other,
typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value, SfinaeEnable >::type  = SfinaeEnable() 
)
inline

Construct a pair from the specified other pair, holding first and second values of (template parameter) type PARAM_1 and PARAM_2 respectively. 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-style allocators. This method requires that T1 and T2 be convertible from PARAM_1 and PARAM_2, respectively.

◆ pair() [22/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( BloombergLP::bslmf::MovableRef< std::pair< PARAM_1, PARAM_2 > >  other,
typename bsl::enable_if< bsl::is_convertible< PARAM_1, T1 >::value &&bsl::is_convertible< PARAM_2, T2 >::value, SfinaeEnable >::type  = SfinaeEnable() 
)
inline

◆ pair() [23/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > >  other,
BloombergLP::bslma::Allocator *  basicAllocator 
)

◆ pair() [24/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
bsl::pair< T1, T2 >::pair ( BloombergLP::bslmf::MovableRef< std::pair< PARAM_1, PARAM_2 > >  other,
BloombergLP::bslma::Allocator *  basicAllocator 
)

◆ pair() [25/25]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
BSLS_KEYWORD_CONSTEXPR bsl::pair< T1, T2 >::pair ( const BloombergLP::bslma::ManagedPtr_PairProxy< PARAM_1, PARAM_2 > &  rhs)

Create a pair that has the same value as the specified rhs pair proxy.

Precondition
The behavior is undefined unless T1 is constructible from PARAM_1 and T2 is constructible from from PARAM_2.

◆ ~pair()

template<class T1 , class T2 >
bsl::pair< T1, T2 >::~pair ( )
default

destructors.

Member Function Documentation

◆ operator=() [1/8]

template<class T1 , class T2 >
pair< T1, T2 > & bsl::pair< T1, T2 >::operator= ( BloombergLP::bslmf::MovableRef< pair< T1, T2 > >  rhs)

Assign to this 'pair' the value of the specified 'rhs' pair (before the call to the assignment), and return a reference providing modifiable access to this object.

Note
Note that 'rhs' is left in a valid but unspecified state. This method requires that (template parameter) types 'T1' and 'T2' be move-assignable.

◆ operator=() [2/8]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
pair & bsl::pair< T1, T2 >::operator= ( BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > >  rhs)

Assign to this pair the value of the specified rhs pair, holding first and second values of (template parameter) types PARAM_1 and PARAM_2 respectively, and return a reference providing modifiable access to this object. This method requires that T1 be assignable from PARAM_1 and T2 be assignable from PARAM_2.

◆ operator=() [3/8]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
pair< T1, T2 > & bsl::pair< T1, T2 >::operator= ( BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > >  rhs)

◆ operator=() [4/8]

template<class T1 , class T2 >
pair & bsl::pair< T1, T2 >::operator= ( const pair< T1, T2 > &  rhs)
default

The copy and move assignment operators are implicitly declared and defined. They are trivial is the corresponding assignment operators are trivial for both (template parameter) types T1 and T2.

◆ operator=() [5/8]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
pair & bsl::pair< T1, T2 >::operator= ( const pair< PARAM_1, PARAM_2 > &  rhs)

Assign to this pair from the specified rhs pair, holding the parameterized types PARAM_1 and PARAM_2, and return a reference offering modifiable access to this object. Assign first the value in rhs.first and second the value in rhs.second. Attempted use of this assignment operator will not compile unless both T1 and T2 supply assignment operators, and T1 is assignable from PARAM_1 and T2 is assignable from PARAM_2.

◆ operator=() [6/8]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
pair< T1, T2 > & bsl::pair< T1, T2 >::operator= ( const pair< PARAM_1, PARAM_2 > &  rhs)
inline

◆ operator=() [7/8]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
BSLS_KEYWORD_CONSTEXPR_CPP14 pair & bsl::pair< T1, T2 >::operator= ( const std::pair< PARAM_1, PARAM_2 > &  rhs)

Assign to this pair from the specified rhs pair, where the type rhs is the pair type native to the compiler's library, holding the parameterized types PARAM_1 and PARAM_2, and return a reference offering modifiable access to this object. Assign first the value in rhs.first and second the value in rhs.second. Attempted use of this assignment operator will not compile unless both T1 and T2 supply assignment operators, and T1 is assignable from PARAM_1 and T2 is assignable from PARAM_2.

◆ operator=() [8/8]

template<class T1 , class T2 >
template<class PARAM_1 , class PARAM_2 >
BSLS_KEYWORD_CONSTEXPR_CPP14 pair< T1, T2 > & bsl::pair< T1, T2 >::operator= ( const std::pair< PARAM_1, PARAM_2 > &  rhs)
inline

The documentation for this class was generated from the following file: