From bde233eea59db38499e0a4b1ed2c0580c3348b3d Mon Sep 17 00:00:00 2001 From: Romain Geissler Date: Fri, 22 Mar 2019 10:26:50 +0000 Subject: [PATCH] Avoid gcc 9 deprecated copy warnings in new_allocator.hpp. --- include/boost/container/new_allocator.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/boost/container/new_allocator.hpp b/include/boost/container/new_allocator.hpp index 51065ef..9af015d 100644 --- a/include/boost/container/new_allocator.hpp +++ b/include/boost/container/new_allocator.hpp @@ -72,6 +72,13 @@ class new_allocator new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW {} + //!Copy assignment operator from other new_allocator. + //!Never throws + new_allocator& operator=(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + { + return *this; + } + //!Constructor from related new_allocator. //!Never throws template @@ -130,6 +137,13 @@ class new_allocator new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW {} + //!Copy assignment operator from other new_allocator. + //!Never throws + new_allocator& operator=(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW + { + return *this; + } + //!Constructor from related new_allocator. //!Never throws template