Fix const correctness bug in __move_assign. Found and fixed by Ion Gaztañaga.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@139032 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1593,7 +1593,7 @@ private:
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
__move_assign_alloc(const basic_string& __str)
|
||||
__move_assign_alloc(basic_string& __str)
|
||||
_NOEXCEPT_(
|
||||
!__alloc_traits::propagate_on_container_move_assignment::value ||
|
||||
is_nothrow_move_assignable<allocator_type>::value)
|
||||
@@ -1601,14 +1601,14 @@ private:
|
||||
__alloc_traits::propagate_on_container_move_assignment::value>());}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __move_assign_alloc(const basic_string& __c, true_type)
|
||||
void __move_assign_alloc(basic_string& __c, true_type)
|
||||
_NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
|
||||
{
|
||||
__alloc() = _VSTD::move(__c.__alloc());
|
||||
}
|
||||
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void __move_assign_alloc(const basic_string& __c, false_type)
|
||||
void __move_assign_alloc(basic_string& __c, false_type)
|
||||
_NOEXCEPT
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user