Quick Links:

bal | bbl | bdl | bsl

Classes | Namespaces | Defines | Typedefs | Functions

bslstl_pair.h File Reference

Provide a simple struct with two members that may use allocators. More...

Go to the source code of this file.

Classes

struct  bsl::Pair_BslmaIdiom< TYPE >
struct  bsl::Pair_ImpUtil
struct  bsl::Pair_First< TYPE >
struct  bsl::Pair_First< TYPE & >
struct  bsl::Pair_Second< TYPE >
struct  bsl::Pair_Second< TYPE & >
class  bsl::pair< T1, T2 >

Namespaces

namespace  std
namespace  bslstl
namespace  bsl

Defines

#define BSLSTL_PAIR_NO_IMPLICIT_DELETED_FOR_MOVE_OPS   1
#define BSLSTL_PAIR_DO_NOT_DEFAULT_THE_DEFAULT_CONSTRUCTOR   1
#define BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE   1

Typedefs

typedef bsl::integral_constant
< int, 0 > 
bsl::Pair_BslmaIdiomNone
typedef bsl::integral_constant
< int, 1 > 
bsl::Pair_BslmaIdiomAtEnd
typedef bsl::integral_constant
< int, 2 > 
bsl::Pair_BslmaIdiomAllocatorArgT

Functions

template<class TYPE >
void std::swap (TYPE &a, TYPE &b)
template<class T1 , class T2 >
BSLS_KEYWORD_CONSTEXPR bool bsl::operator== (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
template<class T1 , class T2 >
BSLS_KEYWORD_CONSTEXPR bool bsl::operator!= (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
template<class T1 , class T2 >
BSLS_KEYWORD_CONSTEXPR bool bsl::operator< (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
template<class T1 , class T2 >
BSLS_KEYWORD_CONSTEXPR bool bsl::operator> (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
template<class T1 , class T2 >
BSLS_KEYWORD_CONSTEXPR bool bsl::operator<= (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
template<class T1 , class T2 >
BSLS_KEYWORD_CONSTEXPR bool bsl::operator>= (const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
template<class T1 , class T2 >
void bsl::swap (pair< T1, T2 > &a, pair< T1, T2 > &b) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(BSLS_KEYWORD_NOEXCEPT_OPERATOR(a.swap(b)))
template<class HASHALG , class T1 , class T2 >
void bsl::hashAppend (HASHALG &hashAlg, const pair< T1, T2 > &input)

Detailed Description


Define Documentation

#define BSLSTL_PAIR_NO_IMPLICIT_DELETED_FOR_MOVE_OPS   1

In order to support the correct signature for copy constructor/assignment operators of members with non-'const' references for those operations, we must take the implicitly generated declarations. However, the specification for assignment through references requires defining the assignment operator in those cases, and that will delete any (otherwise) implicitly-declared constructors, so they must be explicitly defaulted on platforms that support them. However, Visual C++ 2013 refused to recognize these defaults as valid for move constructors, so a special exception must be made in this case. MSVC 2013 implicitly declared and defines a default constructor, even for members that are not default constructible such as references.

#define BSLSTL_PAIR_DO_NOT_DEFAULT_THE_DEFAULT_CONSTRUCTOR   1

When compiling without decltype support, bsl::is_swappable is not defined. In this case we must fall back on the previous, pre-C++17 implementation which simply assumes swappability.

#define BSLSTL_PAIR_DO_NOT_SFINAE_TEST_IS_SWAPPABLE   1