Lines Matching refs:has_value

146     constexpr bool has_value() const noexcept;
359 _LIBCPP_HIDE_FROM_ABI constexpr bool has_value() const noexcept { return this->__engaged_; }
368 _LIBCPP_ASSERT_INTERNAL(!has_value(), "__construct called for engaged __optional_storage");
375 if (__opt.has_value())
381 if (this->__engaged_ == __opt.has_value()) {
430 _LIBCPP_HIDE_FROM_ABI constexpr bool has_value() const noexcept { return __value_ != nullptr; }
438 _LIBCPP_ASSERT_INTERNAL(!has_value(), "__construct called for engaged __optional_storage");
447 if (__opt.has_value())
453 if (has_value() == __opt.has_value()) {
454 if (has_value())
457 if (has_value())
735 if (this->has_value())
775 if (this->has_value() == __opt.has_value()) {
777 if (this->has_value())
780 if (this->has_value()) {
791 …_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator-> called on a disengaged…
796 …_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator-> called on a disengaged…
801 …_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator* called on a disengaged …
806 …_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator* called on a disengaged …
811 …_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator* called on a disengaged …
816 …_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(this->has_value(), "optional operator* called on a disengaged …
820 _LIBCPP_HIDE_FROM_ABI constexpr explicit operator bool() const noexcept { return has_value(); }
823 using __base::has_value;
826 if (!this->has_value())
832 if (!this->has_value())
838 if (!this->has_value())
844 if (!this->has_value())
853 return this->has_value() ? this->__get() : static_cast<value_type>(std::forward<_Up>(__v));
860 …return this->has_value() ? std::move(this->__get()) : static_cast<value_type>(std::forward<_Up>(__…
1063 return __x.has_value() <=> __y.has_value();
1135 return __x.has_value() <=> false;
1243 return __x.has_value() ? *__x <=> __v : strong_ordering::less;