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.
This commit is contained in:
Antonio Sanchez 2020-12-10 14:59:34 -08:00
parent 00be0a7ff3
commit 82c0c18a83

View File

@ -98,19 +98,7 @@ namespace std {
{ return deque_base::insert(position,x); }
void insert(const_iterator position, size_type new_size, const value_type& 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
// either non-GCC or GCC between 4.1 and 10.1
// default implementation which should always work.
void resize(size_type new_size, const value_type& x)
{