projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bfa0131
)
In response to bug #20362, change the order of operations in vector move assignment...
author
Marshall Clow
<mclow.lists@gmail.com>
Mon, 21 Jul 2014 15:11:13 +0000
(15:11 +0000)
committer
Marshall Clow
<mclow.lists@gmail.com>
Mon, 21 Jul 2014 15:11:13 +0000
(15:11 +0000)
llvm-svn: 213546
libcxx/include/vector
patch
|
blob
|
history
diff --git
a/libcxx/include/vector
b/libcxx/include/vector
index
2cc23e5
..
d370214
100644
(file)
--- a/
libcxx/include/vector
+++ b/
libcxx/include/vector
@@
-1331,10
+1331,10
@@
vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
{
deallocate();
+ __base::__move_assign_alloc(__c); // this can throw
this->__begin_ = __c.__begin_;
this->__end_ = __c.__end_;
this->__end_cap() = __c.__end_cap();
- __base::__move_assign_alloc(__c);
__c.__begin_ = __c.__end_ = __c.__end_cap() = nullptr;
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->swap(this, &__c);