From 82c0c18a8373eb57c25f543b77a592467ba8e22e Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Thu, 10 Dec 2020 14:59:34 -0800 Subject: [PATCH] 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. --- Eigen/src/StlSupport/StdDeque.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Eigen/src/StlSupport/StdDeque.h b/Eigen/src/StlSupport/StdDeque.h index 006ac1164..6d47e7572 100644 --- a/Eigen/src/StlSupport/StdDeque.h +++ b/Eigen/src/StlSupport/StdDeque.h @@ -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) {