mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-21 12:24:25 +08:00
Remove private access of std::deque::_M_impl.
This no longer works on gcc or clang, so we should just remove the hack. The default should compile to similar code anyways. (cherry picked from commit 82c0c18a8373eb57c25f543b77a592467ba8e22e)
This commit is contained in:
parent
ece7cec604
commit
ea37d9e73e
@ -98,19 +98,7 @@ namespace std {
|
|||||||
{ return deque_base::insert(position,x); }
|
{ return deque_base::insert(position,x); }
|
||||||
void insert(const_iterator position, size_type new_size, const value_type& x)
|
void insert(const_iterator position, size_type new_size, const value_type& x)
|
||||||
{ deque_base::insert(position, new_size, x); }
|
{ deque_base::insert(position, new_size, x); }
|
||||||
#elif defined(_GLIBCXX_DEQUE) && EIGEN_GNUC_AT_LEAST(4,2) && !EIGEN_GNUC_AT_LEAST(10, 1)
|
|
||||||
// workaround GCC std::deque implementation
|
|
||||||
// GCC 10.1 doesn't let us access _Deque_impl _M_impl anymore and we have to
|
|
||||||
// fall-back to the default case
|
|
||||||
void resize(size_type new_size, const value_type& x)
|
|
||||||
{
|
|
||||||
if (new_size < deque_base::size())
|
|
||||||
deque_base::_M_erase_at_end(this->_M_impl._M_start + new_size);
|
|
||||||
else
|
|
||||||
deque_base::insert(deque_base::end(), new_size - deque_base::size(), x);
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
// either non-GCC or GCC between 4.1 and 10.1
|
|
||||||
// default implementation which should always work.
|
// default implementation which should always work.
|
||||||
void resize(size_type new_size, const value_type& x)
|
void resize(size_type new_size, const value_type& x)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user