void set_value()

in include/unifex/finally.hpp [376:412]


      void set_value(Values&&... values) && noexcept {
        auto* const op = op_;

        UNIFEX_TRY {
          unifex::activate_union_member<std::tuple<std::decay_t<Values>...>>(
            op->value_, static_cast<Values&&>(values)...);
        } UNIFEX_CATCH (...) {
          std::move(*this).set_error(std::current_exception());
          return;
        }

        unifex::deactivate_union_member(op->sourceOp_);

        UNIFEX_TRY {
          using value_receiver = value_receiver<
              SourceSender,
              CompletionSender,
              Receiver,
              Values...>;
          using completion_value_op_t =
            connect_result_t<CompletionSender, value_receiver>;
          auto& completionOp =
              unifex::activate_union_member_with<completion_value_op_t>(
                  op->completionValueOp_,
                  [&] {
                    return unifex::connect(
                        static_cast<CompletionSender&&>(op->completionSender_),
                        value_receiver{op});
                  });
          unifex::start(completionOp);
        } UNIFEX_CATCH (...) {
          using decayed_tuple_t = std::tuple<std::decay_t<Values>...>;
          unifex::deactivate_union_member<decayed_tuple_t>(op->value_);
          unifex::set_error(
              static_cast<Receiver&&>(op->receiver_), std::current_exception());
        }
      }