diff options
Diffstat (limited to 'libcxx/include/utility')
| -rw-r--r-- | libcxx/include/utility | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libcxx/include/utility b/libcxx/include/utility index c4068593d86..3850f8f3524 100644 --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -232,7 +232,18 @@ struct _LIBCPP_VISIBLE pair : first(__p.first), second(__p.second) {} _LIBCPP_INLINE_VISIBILITY + pair(const pair& __p) + _NOEXCEPT_(is_nothrow_copy_constructible<first_type>::value && + is_nothrow_copy_constructible<second_type>::value) + : first(__p.first), + second(__p.second) + { + } + + _LIBCPP_INLINE_VISIBILITY pair& operator=(const pair& __p) + _NOEXCEPT_(is_nothrow_copy_assignable<first_type>::value && + is_nothrow_copy_assignable<second_type>::value) { first = __p.first; second = __p.second; @@ -259,6 +270,14 @@ struct _LIBCPP_VISIBLE pair second(_VSTD::forward<_U2>(__p.second)) {} _LIBCPP_INLINE_VISIBILITY + pair(pair&& __p) _NOEXCEPT_(is_nothrow_move_constructible<first_type>::value && + is_nothrow_move_constructible<second_type>::value) + : first(_VSTD::forward<first_type>(__p.first)), + second(_VSTD::forward<second_type>(__p.second)) + { + } + + _LIBCPP_INLINE_VISIBILITY pair& operator=(pair&& __p) _NOEXCEPT_(is_nothrow_move_assignable<first_type>::value && is_nothrow_move_assignable<second_type>::value) |

