diff --git a/Eigen/src/Core/util/Memory.h b/Eigen/src/Core/util/Memory.h index a278c9129..2c0f9d705 100644 --- a/Eigen/src/Core/util/Memory.h +++ b/Eigen/src/Core/util/Memory.h @@ -913,7 +913,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void* eigen_aligned_alloca_helper(void* pt * \sa \blank \ref TopicStlContainers. */ template -class aligned_allocator : public std::allocator { +class aligned_allocator { public: typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; @@ -928,14 +928,21 @@ class aligned_allocator : public std::allocator { typedef aligned_allocator other; }; - aligned_allocator() : std::allocator() {} + aligned_allocator() = default; - aligned_allocator(const aligned_allocator& other) : std::allocator(other) {} + aligned_allocator(const aligned_allocator&) = default; template - aligned_allocator(const aligned_allocator& other) : std::allocator(other) {} + aligned_allocator(const aligned_allocator&) {} - ~aligned_allocator() {} + template + constexpr bool operator==(const aligned_allocator&) const noexcept { + return true; + } + template + constexpr bool operator!=(const aligned_allocator&) const noexcept { + return false; + } #if EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_STRICT_AT_LEAST(7, 0, 0) // In gcc std::allocator::max_size() is bugged making gcc triggers a warning: