[Development] xcode emplace_back (was: QVector now has rvalue push_back)
Gunnar Roth
gunnar.roth at gmx.de
Tue Jul 21 19:59:38 CEST 2015
> Am 21.07.2015 um 19:14 schrieb Matthew Woehlke <mwoehlke.floss at gmail.com>:
>
> Ergo, that implementation looks... suspicious, and *may* even be
> non-conforming. (Unless push_back is doing something really funky, which
> I somewhat doubt.) You may want to file a bug against that implementation.
this is the push_back implementaion, nothing special afaic see. Besides it s using move() for a rvalue ref which is don’t know why.
template <class _Tp, class _Allocator>
inline _LIBCPP_INLINE_VISIBILITY
void
vector<_Tp, _Allocator>::push_back(value_type&& __x)
{
if (this->__end_ < this->__end_cap())
{
__annotate_increase(1);
__alloc_traits::construct(this->__alloc(),
_VSTD::__to_raw_pointer(this->__end_),
_VSTD::move(__x));
++this->__end_;
}
else
__push_back_slow_path(_VSTD::move(__x));
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150721/0b562a66/attachment.html>
More information about the Development
mailing list