summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/vector
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-10-22 18:25:04 +0000
committerdim <dim@FreeBSD.org>2012-10-22 18:25:04 +0000
commit708d8e446e991358da23bb52ec5320440221f12f (patch)
tree3a061d75674cd5b60d9f6df45d0b8d755da3782f /contrib/libc++/include/vector
parentb8c74d455d2690e710a0802a98a9d310995a52eb (diff)
parent13334223d751d249ccd6475b8cba36ff71ddc972 (diff)
downloadFreeBSD-src-708d8e446e991358da23bb52ec5320440221f12f.zip
FreeBSD-src-708d8e446e991358da23bb52ec5320440221f12f.tar.gz
Import libc++ trunk r165949. Among other improvements and bug fixes,
this has many visibility problems fixed, which should help with compiling certain ports that exercise C++11 mode (i.e. Firefox). Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files, which are referred to in all the source files. MFC after: 1 month
Diffstat (limited to 'contrib/libc++/include/vector')
-rw-r--r--contrib/libc++/include/vector8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/libc++/include/vector b/contrib/libc++/include/vector
index 61f0aef..ee71435 100644
--- a/contrib/libc++/include/vector
+++ b/contrib/libc++/include/vector
@@ -1681,8 +1681,9 @@ vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args)
}
else
{
+ value_type __tmp(_VSTD::forward<_Args>(__args)...);
__move_range(__p, this->__end_, __p + 1);
- *__p = value_type(_VSTD::forward<_Args>(__args)...);
+ *__p = _VSTD::move(__tmp);
}
}
else
@@ -1970,6 +1971,7 @@ public:
typedef allocator_traits<allocator_type> __alloc_traits;
typedef typename __alloc_traits::size_type size_type;
typedef typename __alloc_traits::difference_type difference_type;
+ typedef size_type __storage_type;
typedef __bit_iterator<vector, false> pointer;
typedef __bit_iterator<vector, true> const_pointer;
#ifdef _LIBCPP_DEBUG
@@ -1991,7 +1993,6 @@ public:
typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
private:
- typedef size_type __storage_type;
typedef typename __alloc_traits::template
#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
rebind_alloc<__storage_type>
@@ -2317,7 +2318,7 @@ private:
friend class __bit_const_reference<vector>;
friend class __bit_iterator<vector, false>;
friend class __bit_iterator<vector, true>;
- friend class __bit_array<vector>;
+ friend struct __bit_array<vector>;
friend struct _LIBCPP_VISIBLE hash<vector>;
};
@@ -2699,6 +2700,7 @@ vector<bool, _Allocator>::operator=(vector&& __v)
{
__move_assign(__v, integral_constant<bool,
__storage_traits::propagate_on_container_move_assignment::value>());
+ return *this;
}
template <class _Allocator>
OpenPOWER on IntegriCloud