diff --git a/include/boost/container/deque.hpp b/include/boost/container/deque.hpp index 79d03f9..9ee0ee1 100644 --- a/include/boost/container/deque.hpp +++ b/include/boost/container/deque.hpp @@ -715,7 +715,7 @@ class deque : protected deque_base const_reverse_iterator crend() const BOOST_CONTAINER_NOEXCEPT { return const_reverse_iterator(this->members_.m_start); } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a reference to the nth element //! from the beginning of the container. @@ -726,7 +726,7 @@ class deque : protected deque_base reference operator[](size_type n) BOOST_CONTAINER_NOEXCEPT { return this->members_.m_start[difference_type(n)]; } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a const reference to the nth element //! from the beginning of the container. @@ -737,7 +737,7 @@ class deque : protected deque_base const_reference operator[](size_type n) const BOOST_CONTAINER_NOEXCEPT { return this->members_.m_start[difference_type(n)]; } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a reference to the nth element //! from the beginning of the container. @@ -748,7 +748,7 @@ class deque : protected deque_base reference at(size_type n) { this->priv_range_check(n); return (*this)[n]; } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a const reference to the nth element //! from the beginning of the container. diff --git a/include/boost/container/stable_vector.hpp b/include/boost/container/stable_vector.hpp index a871cee..851b5f2 100644 --- a/include/boost/container/stable_vector.hpp +++ b/include/boost/container/stable_vector.hpp @@ -927,7 +927,7 @@ class stable_vector } } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a reference to the nth element //! from the beginning of the container. @@ -937,7 +937,7 @@ class stable_vector //! Complexity: Constant. reference operator[](size_type n){return value(impl[n]);} - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a const reference to the nth element //! from the beginning of the container. @@ -947,7 +947,7 @@ class stable_vector //! Complexity: Constant. const_reference operator[](size_type n)const{return value(impl[n]);} - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a reference to the nth element //! from the beginning of the container. @@ -962,12 +962,12 @@ class stable_vector return operator[](n); } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a const reference to the nth element //! from the beginning of the container. //! - //! Throws: Nothing. + //! Throws: std::range_error if n >= size() //! //! Complexity: Constant. const_reference at(size_type n)const diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index a81d930..533735a 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -1021,7 +1021,7 @@ class basic_string bool empty() const { return !this->priv_size(); } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a reference to the nth element //! from the beginning of the container. @@ -1032,7 +1032,7 @@ class basic_string reference operator[](size_type n) { return *(this->priv_addr() + n); } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a const reference to the nth element //! from the beginning of the container. @@ -1043,7 +1043,7 @@ class basic_string const_reference operator[](size_type n) const { return *(this->priv_addr() + n); } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a reference to the nth element //! from the beginning of the container. @@ -1057,7 +1057,7 @@ class basic_string return *(this->priv_addr() + n); } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a const reference to the nth element //! from the beginning of the container. diff --git a/include/boost/container/vector.hpp b/include/boost/container/vector.hpp index 186bee5..742d00d 100644 --- a/include/boost/container/vector.hpp +++ b/include/boost/container/vector.hpp @@ -758,7 +758,7 @@ class vector : private container_detail::vector_alloc_holder bool empty() const BOOST_CONTAINER_NOEXCEPT { return !this->members_.m_size; } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a reference to the nth element //! from the beginning of the container. @@ -769,7 +769,7 @@ class vector : private container_detail::vector_alloc_holder reference operator[](size_type n) { return this->members_.m_start[n]; } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a const reference to the nth element //! from the beginning of the container. @@ -780,7 +780,7 @@ class vector : private container_detail::vector_alloc_holder const_reference operator[](size_type n) const BOOST_CONTAINER_NOEXCEPT { return this->members_.m_start[n]; } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a reference to the nth element //! from the beginning of the container. @@ -791,7 +791,7 @@ class vector : private container_detail::vector_alloc_holder reference at(size_type n) { this->priv_check_range(n); return this->members_.m_start[n]; } - //! Requires: size() < n. + //! Requires: size() > n. //! //! Effects: Returns a const reference to the nth element //! from the beginning of the container.