Quick Links:

bal | bbl | bdl | bsl

Public Types | Public Member Functions | Public Attributes | Protected Attributes

bsl::pair< T1, T2 > Class Template Reference
[Component bslstl_pair]

#include <bslstl_pair.h>

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

List of all members.

Public Types

typedef T1 first_type
typedef T2 second_type

Public Member Functions

BSLS_KEYWORD_CONSTEXPR pair ()
 pair (BloombergLP::bslma::Allocator *basicAllocator)
 pair (const pair &original, BloombergLP::bslma::Allocator *basicAllocator)
BSLS_KEYWORD_CONSTEXPR 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 >
BSLS_KEYWORD_CONSTEXPR 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< typenamebsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), void * >::type=0)
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 >
BSLS_KEYWORD_CONSTEXPR 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< typenamebsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), void * >::type=0)
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 >
BSLS_KEYWORD_CONSTEXPR 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< typenamebsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), void * >::type=0)
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 >
BSLS_KEYWORD_CONSTEXPR 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< typenamebsl::remove_reference< PARAM_2 >::type >::value &&bsl::is_convertible< PARAM_2, BloombergLP::bslma::Allocator * >::value), void * >::type=0)
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 >
BSLS_KEYWORD_CONSTEXPR pair (const pair< PARAM_1, PARAM_2 > &other)
template<class PARAM_1 , class PARAM_2 >
BSLS_KEYWORD_CONSTEXPR 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 >
BSLS_KEYWORD_CONSTEXPR 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, void * >::type=0)
template<class PARAM_1 , class PARAM_2 >
BSLS_KEYWORD_CONSTEXPR 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, void * >::type=0)
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 ()
template<class PARAM_1 , class PARAM_2 >
pairoperator= (const pair< PARAM_1, PARAM_2 > &rhs)
pairoperator= (BloombergLP::bslmf::MovableRef< pair > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(false)
template<class PARAM_1 , class PARAM_2 >
pairoperator= (BloombergLP::bslmf::MovableRef< pair< PARAM_1, PARAM_2 > > rhs)
template<class PARAM_1 , class PARAM_2 >
pairoperator= (const std::pair< PARAM_1, PARAM_2 > &rhs)

Public Attributes

T1 first

Protected Attributes

T2 second

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 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 Component bslstl_pair


Member Data Documentation

T1 bsl::Pair_First< T1 >::first [inherited]
T2 bsl::Pair_Second< T2 >::second [protected, inherited]

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