[libcxx] NFC. Correct wordings of _LIBCPP_ASSERT debug messages
Differential Revision: https://reviews.llvm.org/D102195
NOKEYCHECK=True
GitOrigin-RevId: 96100f15082679b2c75c7744b8eb4fc87fcf71f5
diff --git a/include/optional b/include/optional
index 0c2fc8d..e4f3938 100644
--- a/include/optional
+++ b/include/optional
@@ -878,7 +878,7 @@
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
@@ -891,7 +891,7 @@
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
@@ -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 on 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 on 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 on 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 on a disengaged value");
return _VSTD::move(this->__get());
}