From d6a270e8e10d0de58f78fdb93f11a5b881cc7ef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Sat, 2 Jan 2021 16:24:37 +0100 Subject: [PATCH] Correct "throws" part of several operations as the library by default throws its own exception types. --- include/boost/container/deque.hpp | 4 ++-- include/boost/container/slist.hpp | 4 ++-- include/boost/container/stable_vector.hpp | 4 ++-- include/boost/container/vector.hpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/boost/container/deque.hpp b/include/boost/container/deque.hpp index d95314e..f2413f0 100644 --- a/include/boost/container/deque.hpp +++ b/include/boost/container/deque.hpp @@ -1395,7 +1395,7 @@ class deque : protected deque_base::type, //! Effects: Returns a reference to the nth element //! from the beginning of the container. //! - //! Throws: std::range_error if n >= size() + //! Throws: range_error if n >= size() //! //! Complexity: Constant. BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE @@ -1410,7 +1410,7 @@ class deque : protected deque_base::type, //! Effects: Returns a const reference to the nth element //! from the beginning of the container. //! - //! Throws: std::range_error if n >= size() + //! Throws: range_error if n >= size() //! //! Complexity: Constant. BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE diff --git a/include/boost/container/slist.hpp b/include/boost/container/slist.hpp index f08c4b8..19cfc03 100644 --- a/include/boost/container/slist.hpp +++ b/include/boost/container/slist.hpp @@ -1038,7 +1038,7 @@ class slist //! Effects: Transfers all the elements of list x to this list, after the //! the element pointed by p. No destructors or copy constructors are called. //! - //! Throws: std::runtime_error if this' allocator and x's allocator + //! Throws: runtime_error if this' allocator and x's allocator //! are not equal. //! //! Complexity: Linear to the elements in x. @@ -1058,7 +1058,7 @@ class slist //! Effects: Transfers all the elements of list x to this list, after the //! the element pointed by p. No destructors or copy constructors are called. //! - //! Throws: std::runtime_error if this' allocator and x's allocator + //! Throws: runtime_error if this' allocator and x's allocator //! are not equal. //! //! Complexity: Linear to the elements in x. diff --git a/include/boost/container/stable_vector.hpp b/include/boost/container/stable_vector.hpp index 4a26ee5..d62fb52 100644 --- a/include/boost/container/stable_vector.hpp +++ b/include/boost/container/stable_vector.hpp @@ -1441,7 +1441,7 @@ class stable_vector //! Effects: Returns a reference to the nth element //! from the beginning of the container. //! - //! Throws: std::range_error if n >= size() + //! Throws: range_error if n >= size() //! //! Complexity: Constant. BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE @@ -1458,7 +1458,7 @@ class stable_vector //! Effects: Returns a const reference to the nth element //! from the beginning of the container. //! - //! Throws: std::range_error if n >= size() + //! Throws: range_error if n >= size() //! //! Complexity: Constant. BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE diff --git a/include/boost/container/vector.hpp b/include/boost/container/vector.hpp index 0d7f837..e641ab5 100644 --- a/include/boost/container/vector.hpp +++ b/include/boost/container/vector.hpp @@ -1732,7 +1732,7 @@ private: //! Effects: Returns a reference to the nth element //! from the beginning of the container. //! - //! Throws: std::range_error if n >= size() + //! Throws: range_error if n >= size() //! //! Complexity: Constant. BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE reference at(size_type n) @@ -1746,7 +1746,7 @@ private: //! Effects: Returns a const reference to the nth element //! from the beginning of the container. //! - //! Throws: std::range_error if n >= size() + //! Throws: range_error if n >= size() //! //! Complexity: Constant. BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE const_reference at(size_type n) const