_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;
}
_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;
}
_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;
_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;
void
deque<_Tp, _Allocator>::pop_back()
{
- _LIBCPP_ASSERT(!empty(), "deque::pop_back called for empty deque");
+ _LIBCPP_ASSERT(!empty(), "deque::pop_back called on 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() +
{
#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;
{
#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;
{
#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 its valid range");
#endif
__i += __n;
return *this;
{
#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 its valid range");
#endif
return __i[__n];
}
{
#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;
{
#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;
{
#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;
{
#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;
void
list<_Tp, _Alloc>::pop_back()
{
- _LIBCPP_ASSERT(!empty(), "list::pop_back() called with empty list");
+ _LIBCPP_ASSERT(!empty(), "list::pop_back() called on an empty list");
__node_allocator& __na = base::__node_alloc();
__link_pointer __n = base::__end_.__prev_;
base::__unlink_nodes(__n, __n);
{
#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");
+ "list::splice(iterator, list, iterator) called with the second iterator"
+ " not dereferenceable");
#endif
if (__p.__ptr_ != __i.__ptr_ && __p.__ptr_ != __i.__ptr_->__next_)
{
add_pointer_t<value_type const>
operator->() const
{
- _LIBCPP_ASSERT(this->has_value(), "optional operator-> called for disengaged value");
+ _LIBCPP_ASSERT(this->has_value(), "optional operator-> called on a disengaged value");
#ifndef _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF
return _VSTD::addressof(this->__get());
#else
add_pointer_t<value_type>
operator->()
{
- _LIBCPP_ASSERT(this->has_value(), "optional operator-> called for disengaged value");
+ _LIBCPP_ASSERT(this->has_value(), "optional operator-> called on a disengaged value");
#ifndef _LIBCPP_HAS_NO_BUILTIN_ADDRESSOF
return _VSTD::addressof(this->__get());
#else
const value_type&
operator*() const&
{
- _LIBCPP_ASSERT(this->has_value(), "optional operator* called for disengaged value");
+ _LIBCPP_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
return this->__get();
}
value_type&
operator*() &
{
- _LIBCPP_ASSERT(this->has_value(), "optional operator* called for disengaged value");
+ _LIBCPP_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
return this->__get();
}
value_type&&
operator*() &&
{
- _LIBCPP_ASSERT(this->has_value(), "optional operator* called for disengaged value");
+ _LIBCPP_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
return _VSTD::move(this->__get());
}
const value_type&&
operator*() const&&
{
- _LIBCPP_ASSERT(this->has_value(), "optional operator* called for disengaged value");
+ _LIBCPP_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
return _VSTD::move(this->__get());
}
_LIBCPP_INLINE_VISIBILITY reference front() _NOEXCEPT
{
- _LIBCPP_ASSERT(!empty(), "front() called for empty vector");
+ _LIBCPP_ASSERT(!empty(), "front() called on 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 on 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 on 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 on an empty vector");
return *(this->__end_ - 1);
}
void
vector<_Tp, _Allocator>::pop_back()
{
- _LIBCPP_ASSERT(!empty(), "vector::pop_back called for empty vector");
+ _LIBCPP_ASSERT(!empty(), "vector::pop_back called on an empty vector");
this->__destruct_at_end(this->__end_ - 1);
}