6#include "../detail/slots/slot_view.hpp"
7#include "../detail/slots/typed_slot.hpp"
8#include "../result.hpp"
29 static_assert(!std::is_reference_v<T>,
30 "yorch::direct_out<T> does not support reference types; direct-output payloads must be owned values");
31 static_assert(!std::is_void_v<T>,
32 "yorch::direct_out<T> requires a non-void payload type");
44 template <
typename... Args>
46 noexcept(
noexcept(slot_.emplace(std::forward<Args>(args)...))) {
47 return slot_.emplace(std::forward<Args>(args)...);
50 template <
typename... Args>
52 noexcept(
noexcept(
emplace(std::forward<Args>(args)...))) {
53 emplace(std::forward<Args>(args)...);
61 [[nodiscard]]
constexpr bool has_value() const noexcept {
62 return slot_.has_value();
Non-owning typed access view over a slot-like storage object.
Output sink passed to direct-output tasks.
constexpr void destroy() noexcept
constexpr step_result success(Args &&... args) noexcept(noexcept(emplace(std::forward< Args >(args)...)))
constexpr direct_out(detail::slot_view< T > slot) noexcept
Binds the sink to an already-created typed slot view.
constexpr bool has_value() const noexcept
constexpr T & emplace(Args &&... args) noexcept(noexcept(slot_.emplace(std::forward< Args >(args)...)))
constexpr direct_out(detail::typed_slot< T, detail::slot_logical_policy::maybe_payload > &slot) noexcept
Represents the basic outcome of a task step.
static constexpr step_result success() noexcept
Creates a successful result.