libstdc++-v3-gcc-4.8.5

git-svn-id: svn://kolibrios.org@6325 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2016-03-12 09:38:51 +00:00
parent 3b53803119
commit d73a7e667d
68 changed files with 2581 additions and 3307 deletions

View File

@@ -764,11 +764,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
bool
is_lock_free() const noexcept
{ return __atomic_is_lock_free(_M_type_size(1), nullptr); }
{ return __atomic_is_lock_free(sizeof(__pointer_type), nullptr); }
bool
is_lock_free() const volatile noexcept
{ return __atomic_is_lock_free(_M_type_size(1), nullptr); }
{ return __atomic_is_lock_free(sizeof(__pointer_type), nullptr); }
void
store(__pointer_type __p,

View File

@@ -233,7 +233,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_add_ref_lock()
{
// Perform lock-free add-if-not-zero operation.
_Atomic_word __count = _M_use_count;
_Atomic_word __count = _M_get_use_count();
do
{
if (__count == 0)
@@ -391,7 +391,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
template<typename... _Args>
_Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
: _M_impl(__a), _M_storage()
: _M_impl(__a)
{
_M_impl._M_ptr = static_cast<_Tp*>(static_cast<void*>(&_M_storage));
// _GLIBCXX_RESOLVE_LIB_DEFECTS
@@ -819,7 +819,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _M_ptr(__r.get()), _M_refcount()
{
__glibcxx_function_requires(_ConvertibleConcept<_Tp1*, _Tp*>)
auto __tmp = std::__addressof(*__r.get());
auto __tmp = __r.get();
_M_refcount = __shared_count<_Lp>(std::move(__r));
__enable_shared_from_this_helper(_M_refcount, __tmp, __tmp);
}

View File

@@ -2279,7 +2279,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_RandomAccessIterator __last)
{
_RandomAccessIterator __mid = __first + (__last - __first) / 2;
std::__move_median_to_first(__first, __first + 1, __mid, (__last - 2));
std::__move_median_to_first(__first, __first + 1, __mid, __last - 1);
return std::__unguarded_partition(__first + 1, __last, *__first);
}
@@ -2291,7 +2291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_RandomAccessIterator __last, _Compare __comp)
{
_RandomAccessIterator __mid = __first + (__last - __first) / 2;
std::__move_median_to_first(__first, __first + 1, __mid, (__last - 2),
std::__move_median_to_first(__first, __first + 1, __mid, __last - 1,
__comp);
return std::__unguarded_partition(__first + 1, __last, *__first, __comp);
}
@@ -5193,7 +5193,12 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
if (__first != __last)
for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
std::iter_swap(__i, __first + (std::rand() % ((__i - __first) + 1)));
{
_RandomAccessIterator __j = __first
+ std::rand() % ((__i - __first) + 1);
if (__i != __j)
std::iter_swap(__i, __j);
}
}
/**
@@ -5227,7 +5232,11 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
if (__first == __last)
return;
for (_RandomAccessIterator __i = __first + 1; __i != __last; ++__i)
std::iter_swap(__i, __first + __rand((__i - __first) + 1));
{
_RandomAccessIterator __j = __first + __rand((__i - __first) + 1);
if (__i != __j)
std::iter_swap(__i, __j);
}
}

View File

@@ -510,11 +510,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Link_type
_M_end()
{ return static_cast<_Link_type>(&this->_M_impl._M_header); }
{ return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
_Const_Link_type
_M_end() const
{ return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
{ return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
static const_reference
_S_value(_Const_Link_type __x)

View File

@@ -1361,7 +1361,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
void
_M_move_assign(vector&& __x, std::true_type) noexcept
{
const vector __tmp(std::move(*this));
vector __tmp(get_allocator());
this->_M_impl._M_swap_data(__tmp._M_impl);
this->_M_impl._M_swap_data(__x._M_impl);
if (_Alloc_traits::_S_propagate_on_move_assign())
std::__alloc_on_move(_M_get_Tp_allocator(),