Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2011-07-01 23:24:36 +0400
committerHoward Hinnant <hhinnant@apple.com>2011-07-01 23:24:36 +0400
commit5a33687da07cb8ffc68ef5065ed46bab5c4d6555 (patch)
treea040ca6f46310d29afc2a8f8b3337eb6c692a8eb /libcxx/include/utility
parent68b0e8456e7934b97ffb22b07fdde705abd33fd1 (diff)
Correct for new rules regarding implicitly deleted special members. http://llvm.org/bugs/show_bug.cgi?id=10191
llvm-svn: 134248
Diffstat (limited to 'libcxx/include/utility')
-rw-r--r--libcxx/include/utility19
1 files changed, 19 insertions, 0 deletions
diff --git a/libcxx/include/utility b/libcxx/include/utility
index c4068593d86c..3850f8f3524a 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)