diff --git a/doc/container.qbk b/doc/container.qbk index b0d04ff..5aef266 100644 --- a/doc/container.qbk +++ b/doc/container.qbk @@ -1342,6 +1342,7 @@ use [*Boost.Container]? There are several reasons for that: * Fixed bugs/issues: * [@https://github.com/boostorg/container/issues/150 GitHub #150: ['"Use std::contiguous_iterator_tag if available"]]. + * [@https://github.com/boostorg/container/issues/180 GitHub #180: ['"polymorphic_allocator's copy special member functions are not noexcept"]]. * [@https://github.com/boostorg/container/issues/184 GitHub #184: ['"Issues with custom exceptions implementation"]]. [endsect] diff --git a/include/boost/container/pmr/polymorphic_allocator.hpp b/include/boost/container/pmr/polymorphic_allocator.hpp index b3a1eb3..2accbc2 100644 --- a/include/boost/container/pmr/polymorphic_allocator.hpp +++ b/include/boost/container/pmr/polymorphic_allocator.hpp @@ -53,13 +53,13 @@ class polymorphic_allocator //! Throws: Nothing //! //! Notes: This constructor provides an implicit conversion from memory_resource*. - polymorphic_allocator(memory_resource* r) + polymorphic_allocator(memory_resource* r) BOOST_NOEXCEPT : m_resource(r) { BOOST_ASSERT(r != 0); } //! Effects: Sets m_resource to //! other.resource(). - polymorphic_allocator(const polymorphic_allocator& other) + polymorphic_allocator(const polymorphic_allocator& other) BOOST_NOEXCEPT : m_resource(other.m_resource) {} @@ -72,7 +72,7 @@ class polymorphic_allocator //! Effects: Sets m_resource to //! other.resource(). - polymorphic_allocator& operator=(const polymorphic_allocator& other) + polymorphic_allocator& operator=(const polymorphic_allocator& other) BOOST_NOEXCEPT { m_resource = other.m_resource; return *this; } //! Returns: Equivalent to @@ -86,7 +86,7 @@ class polymorphic_allocator //! Effects: Equivalent to m_resource->deallocate(p, n * sizeof(T), alignof(T)). //! //! Throws: Nothing. - void deallocate(T* p, size_t n) + void deallocate(T* p, size_t n) BOOST_NOEXCEPT { m_resource->deallocate(p, n*sizeof(T), ::boost::move_detail::alignment_of::value); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) @@ -133,12 +133,12 @@ class polymorphic_allocator //! Returns: Equivalent to //! `polymorphic_allocator()`. - polymorphic_allocator select_on_container_copy_construction() const + polymorphic_allocator select_on_container_copy_construction() const BOOST_NOEXCEPT { return polymorphic_allocator(); } //! Returns: //! m_resource. - memory_resource* resource() const + memory_resource* resource() const BOOST_NOEXCEPT { return m_resource; } private: