diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table --- a/libcxx/include/__hash_table +++ b/libcxx/include/__hash_table @@ -336,7 +336,7 @@ _LIBCPP_INLINE_VISIBILITY __hash_iterator& operator++() { _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to increment non-incrementable unordered container iterator"); + "Attempted to increment a non-incrementable unordered container iterator"); __node_ = __node_->__next_; return *this; } @@ -456,7 +456,7 @@ _LIBCPP_INLINE_VISIBILITY __hash_const_iterator& operator++() { _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to increment non-incrementable unordered container const_iterator"); + "Attempted to increment a non-incrementable unordered container const_iterator"); __node_ = __node_->__next_; return *this; } @@ -569,7 +569,7 @@ _LIBCPP_INLINE_VISIBILITY __hash_local_iterator& operator++() { _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to increment non-incrementable unordered container local_iterator"); + "Attempted to increment a non-incrementable unordered container local_iterator"); __node_ = __node_->__next_; if (__node_ != nullptr && __constrain_hash(__node_->__hash(), __bucket_count_) != __bucket_) __node_ = nullptr; @@ -714,7 +714,7 @@ _LIBCPP_INLINE_VISIBILITY __hash_const_local_iterator& operator++() { _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to increment non-incrementable unordered container const_local_iterator"); + "Attempted to increment a non-incrementable unordered container const_local_iterator"); __node_ = __node_->__next_; if (__node_ != nullptr && __constrain_hash(__node_->__hash(), __bucket_count_) != __bucket_) __node_ = nullptr; diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -2721,7 +2721,7 @@ void deque<_Tp, _Allocator>::pop_back() { - _LIBCPP_ASSERT(!empty(), "deque::pop_back called for empty deque"); + _LIBCPP_ASSERT(!empty(), "deque::pop_back called for an empty deque"); allocator_type& __a = __base::__alloc(); size_type __p = __base::size() + __base::__start_ - 1; __alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() + diff --git a/libcxx/include/iterator b/libcxx/include/iterator --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -1362,7 +1362,7 @@ { #if _LIBCPP_DEBUG_LEVEL == 2 _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to increment non-incrementable iterator"); + "Attempted to increment a non-incrementable iterator"); #endif ++__i; return *this; @@ -1374,7 +1374,7 @@ { #if _LIBCPP_DEBUG_LEVEL == 2 _LIBCPP_ASSERT(__get_const_db()->__decrementable(this), - "Attempted to decrement non-decrementable iterator"); + "Attempted to decrement a non-decrementable iterator"); #endif --__i; return *this; @@ -1387,7 +1387,7 @@ { #if _LIBCPP_DEBUG_LEVEL == 2 _LIBCPP_ASSERT(__get_const_db()->__addable(this, __n), - "Attempted to add/subtract iterator outside of valid range"); + "Attempted to add/subtract an iterator outside of valid range"); #endif __i += __n; return *this; @@ -1400,7 +1400,7 @@ { #if _LIBCPP_DEBUG_LEVEL == 2 _LIBCPP_ASSERT(__get_const_db()->__subscriptable(this, __n), - "Attempted to subscript iterator outside of valid range"); + "Attempted to subscript an iterator outside of valid range"); #endif return __i[__n]; } diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -377,7 +377,7 @@ { #if _LIBCPP_DEBUG_LEVEL == 2 _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to increment non-incrementable list::iterator"); + "Attempted to increment a non-incrementable list::iterator"); #endif __ptr_ = __ptr_->__next_; return *this; @@ -390,7 +390,7 @@ { #if _LIBCPP_DEBUG_LEVEL == 2 _LIBCPP_ASSERT(__get_const_db()->__decrementable(this), - "Attempted to decrement non-decrementable list::iterator"); + "Attempted to decrement a non-decrementable list::iterator"); #endif __ptr_ = __ptr_->__prev_; return *this; @@ -504,7 +504,7 @@ { #if _LIBCPP_DEBUG_LEVEL == 2 _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(this), - "Attempted to increment non-incrementable list::const_iterator"); + "Attempted to increment a non-incrementable list::const_iterator"); #endif __ptr_ = __ptr_->__next_; return *this; @@ -517,7 +517,7 @@ { #if _LIBCPP_DEBUG_LEVEL == 2 _LIBCPP_ASSERT(__get_const_db()->__decrementable(this), - "Attempted to decrement non-decrementable list::const_iterator"); + "Attempted to decrement a non-decrementable list::const_iterator"); #endif __ptr_ = __ptr_->__prev_; return *this; @@ -1772,7 +1772,7 @@ void list<_Tp, _Alloc>::pop_back() { - _LIBCPP_ASSERT(!empty(), "list::pop_back() called with empty list"); + _LIBCPP_ASSERT(!empty(), "list::pop_back() called with an empty list"); __node_allocator& __na = base::__node_alloc(); __link_pointer __n = base::__end_.__prev_; base::__unlink_nodes(__n, __n); @@ -2049,11 +2049,11 @@ { #if _LIBCPP_DEBUG_LEVEL == 2 _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__p) == this, - "list::splice(iterator, list, iterator) called with first iterator not" - " referring to this list"); + "list::splice(iterator, list, iterator) called with the first iterator" + " not referring to this list"); _LIBCPP_ASSERT(__get_const_db()->__find_c_from_i(&__i) == &__c, - "list::splice(iterator, list, iterator) called with second iterator not" - " referring to list argument"); + "list::splice(iterator, list, iterator) called with the second iterator" + " not referring to list argument"); _LIBCPP_ASSERT(__get_const_db()->__dereferenceable(&__i), "list::splice(iterator, list, iterator) called with second iterator not" " dereferenceable"); diff --git a/libcxx/include/optional b/libcxx/include/optional --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -878,7 +878,7 @@ add_pointer_t operator->() const { - _LIBCPP_ASSERT(this->has_value(), "optional operator-> called for disengaged value"); + _LIBCPP_ASSERT(this->has_value(), "optional operator-> called for a disengaged value"); #ifndef _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF return _VSTD::addressof(this->__get()); #else @@ -891,7 +891,7 @@ add_pointer_t operator->() { - _LIBCPP_ASSERT(this->has_value(), "optional operator-> called for disengaged value"); + _LIBCPP_ASSERT(this->has_value(), "optional operator-> called for a disengaged value"); #ifndef _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF return _VSTD::addressof(this->__get()); #else @@ -904,7 +904,7 @@ const value_type& operator*() const& { - _LIBCPP_ASSERT(this->has_value(), "optional operator* called for disengaged value"); + _LIBCPP_ASSERT(this->has_value(), "optional operator* called for a disengaged value"); return this->__get(); } @@ -913,7 +913,7 @@ value_type& operator*() & { - _LIBCPP_ASSERT(this->has_value(), "optional operator* called for disengaged value"); + _LIBCPP_ASSERT(this->has_value(), "optional operator* called for a disengaged value"); return this->__get(); } @@ -922,7 +922,7 @@ value_type&& operator*() && { - _LIBCPP_ASSERT(this->has_value(), "optional operator* called for disengaged value"); + _LIBCPP_ASSERT(this->has_value(), "optional operator* called for a disengaged value"); return _VSTD::move(this->__get()); } @@ -931,7 +931,7 @@ const value_type&& operator*() const&& { - _LIBCPP_ASSERT(this->has_value(), "optional operator* called for disengaged value"); + _LIBCPP_ASSERT(this->has_value(), "optional operator* called for a disengaged value"); return _VSTD::move(this->__get()); } diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -674,22 +674,22 @@ _LIBCPP_INLINE_VISIBILITY reference front() _NOEXCEPT { - _LIBCPP_ASSERT(!empty(), "front() called for empty vector"); + _LIBCPP_ASSERT(!empty(), "front() called for an empty vector"); return *this->__begin_; } _LIBCPP_INLINE_VISIBILITY const_reference front() const _NOEXCEPT { - _LIBCPP_ASSERT(!empty(), "front() called for empty vector"); + _LIBCPP_ASSERT(!empty(), "front() called for an empty vector"); return *this->__begin_; } _LIBCPP_INLINE_VISIBILITY reference back() _NOEXCEPT { - _LIBCPP_ASSERT(!empty(), "back() called for empty vector"); + _LIBCPP_ASSERT(!empty(), "back() called for an empty vector"); return *(this->__end_ - 1); } _LIBCPP_INLINE_VISIBILITY const_reference back() const _NOEXCEPT { - _LIBCPP_ASSERT(!empty(), "back() called for empty vector"); + _LIBCPP_ASSERT(!empty(), "back() called for an empty vector"); return *(this->__end_ - 1); } @@ -1698,7 +1698,7 @@ void vector<_Tp, _Allocator>::pop_back() { - _LIBCPP_ASSERT(!empty(), "vector::pop_back called for empty vector"); + _LIBCPP_ASSERT(!empty(), "vector::pop_back called for an empty vector"); this->__destruct_at_end(this->__end_ - 1); }