Lines Matching refs:unexpected
57 class unexpected; variable
59 unexpected(E) -> unexpected<E>;
90 using unexpected_type = unexpected<E>;
117 else var_ = unexpected(rhs.error()); in expected()
136 else var_ = unexpected(rhs.error()); in expected()
156 else var_ = unexpected(std::move(rhs.error())); in expected()
175 else var_ = unexpected(std::move(rhs.error())); in expected()
182 !std::is_same_v<unexpected<E>, std::remove_cv_t<std::remove_reference_t<U>>> &&
192 !std::is_same_v<unexpected<E>, std::remove_cv_t<std::remove_reference_t<U>>> &&
203 constexpr expected(const unexpected<G>& e) in expected()
210 constexpr explicit expected(const unexpected<G>& e) in expected()
218 constexpr expected(unexpected<G>&& e) in expected()
225 constexpr explicit expected(unexpected<G>&& e) in expected()
280 expected& operator=(const unexpected<G>& rhs) {
289 expected& operator=(unexpected<G>&& rhs) {
373 friend constexpr bool operator==(const expected<T1, E1>&, const unexpected<E2>&);
375 friend constexpr bool operator==(const unexpected<E2>&, const expected<T1, E1>&);
377 friend constexpr bool operator!=(const expected<T1, E1>&, const unexpected<E2>&);
379 friend constexpr bool operator!=(const unexpected<E2>&, const expected<T1, E1>&);
403 constexpr bool operator==(const expected<T1, E1>& x, const unexpected<E2>& y) {
407 constexpr bool operator==(const unexpected<E2>& x, const expected<T1, E1>& y) {
411 constexpr bool operator!=(const expected<T1, E1>& x, const unexpected<E2>& y) {
415 constexpr bool operator!=(const unexpected<E2>& x, const expected<T1, E1>& y) {
424 using unexpected_type = unexpected<E>;
437 if (!rhs.has_value()) var_ = unexpected(rhs.error()); in expected()
445 if (!rhs.has_value()) var_ = unexpected(rhs.error()); in expected()
454 if (!rhs.has_value()) var_ = unexpected(std::move(rhs.error())); in expected()
462 if (!rhs.has_value()) var_ = unexpected(std::move(rhs.error())); in expected()
470 constexpr expected(const unexpected<G>& e) in expected()
477 constexpr explicit expected(const unexpected<G>& e) in expected()
485 constexpr expected(unexpected<G>&& e) in expected()
492 constexpr explicit expected(unexpected<G>&& e) in expected()
528 expected& operator=(const unexpected<G>& rhs) {
537 expected& operator=(unexpected<G>&& rhs) {
601 class unexpected {
604 constexpr unexpected(const unexpected&) = default;
605 constexpr unexpected(unexpected&&) noexcept(std::is_nothrow_move_constructible_v<E>) = default;
610 !std::is_same_v<std::remove_cv_t<std::remove_reference_t<E>>, unexpected>)>
612 constexpr unexpected(Err&& e) : val_(std::forward<Err>(e)) {} in unexpected() function
617 constexpr explicit unexpected(std::in_place_t, std::initializer_list<U> il, Args&&... args) in unexpected() function
622 !std::is_constructible_v<E, unexpected<Err>&> &&
623 !std::is_constructible_v<E, unexpected<Err>> &&
624 !std::is_constructible_v<E, const unexpected<Err>&> &&
625 !std::is_constructible_v<E, const unexpected<Err>> &&
626 !std::is_convertible_v<unexpected<Err>&, E> &&
627 !std::is_convertible_v<unexpected<Err>, E> &&
628 !std::is_convertible_v<const unexpected<Err>&, E> &&
629 !std::is_convertible_v<const unexpected<Err>, E> &&
633 constexpr unexpected(const unexpected<Err>& rhs) in unexpected() function
638 !std::is_constructible_v<E, unexpected<Err>&> &&
639 !std::is_constructible_v<E, unexpected<Err>> &&
640 !std::is_constructible_v<E, const unexpected<Err>&> &&
641 !std::is_constructible_v<E, const unexpected<Err>> &&
642 !std::is_convertible_v<unexpected<Err>&, E> &&
643 !std::is_convertible_v<unexpected<Err>, E> &&
644 !std::is_convertible_v<const unexpected<Err>&, E> &&
645 !std::is_convertible_v<const unexpected<Err>, E> &&
648 constexpr explicit unexpected(const unexpected<Err>& rhs) in unexpected() function
653 !std::is_constructible_v<E, unexpected<Err>&> &&
654 !std::is_constructible_v<E, unexpected<Err>> &&
655 !std::is_constructible_v<E, const unexpected<Err>&> &&
656 !std::is_constructible_v<E, const unexpected<Err>> &&
657 !std::is_convertible_v<unexpected<Err>&, E> &&
658 !std::is_convertible_v<unexpected<Err>, E> &&
659 !std::is_convertible_v<const unexpected<Err>&, E> &&
660 !std::is_convertible_v<const unexpected<Err>, E> &&
664 constexpr unexpected(unexpected<Err>&& rhs) in unexpected() function
669 !std::is_constructible_v<E, unexpected<Err>&> &&
670 !std::is_constructible_v<E, unexpected<Err>> &&
671 !std::is_constructible_v<E, const unexpected<Err>&> &&
672 !std::is_constructible_v<E, const unexpected<Err>> &&
673 !std::is_convertible_v<unexpected<Err>&, E> &&
674 !std::is_convertible_v<unexpected<Err>, E> &&
675 !std::is_convertible_v<const unexpected<Err>&, E> &&
676 !std::is_convertible_v<const unexpected<Err>, E> &&
679 constexpr explicit unexpected(unexpected<Err>&& rhs) in unexpected() function
683 constexpr unexpected& operator=(const unexpected&) = default;
684 constexpr unexpected& operator=(unexpected&&) noexcept(std::is_nothrow_move_assignable_v<E>) =
687 constexpr unexpected& operator=(const unexpected<Err>& rhs) {
692 constexpr unexpected& operator=(unexpected<Err>&& rhs) {
703 void swap(unexpected& other) noexcept(std::is_nothrow_swappable_v<E>) { in swap()
709 operator==(const unexpected<E1>& e1, const unexpected<E2>& e2);
712 operator!=(const unexpected<E1>& e1, const unexpected<E2>& e2);
715 friend void swap(unexpected<E1>& x, unexpected<E1>& y) noexcept(noexcept(x.swap(y)));
723 operator==(const unexpected<E1>& e1, const unexpected<E2>& e2) {
729 operator!=(const unexpected<E1>& e1, const unexpected<E2>& e2) {
734 void swap(unexpected<E1>& x, unexpected<E1>& y) noexcept(noexcept(x.swap(y))) { in swap()