16template <
typename V,
typename E>
25 template <
typename...
Args>
35 template <
typename...
Args>
36 void Store(
Args&&...
args)
noexcept(std::is_nothrow_constructible_v<Result<V, E>,
Args&&...>) {
44 template <
bool Condition>
47 return std::move(
Get());
49 return std::as_const(
Get());
59 template <
bool SymmetricTransfer,
bool Shared>
61 if constexpr (std::is_copy_constructible_v<Result<V, E>>) {
63 const auto ref = caller.GetRef();
68 return BaseCore::SetResultImpl<SymmetricTransfer, Shared>();
77 return BaseCore::SetResultImpl<SymmetricTransfer, Shared>();
78 }
else if constexpr (std::is_move_constructible_v<Result<V, E>>) {
82 return BaseCore::SetResultImpl<SymmetricTransfer, Shared>();
Reference counting interface.
Encapsulated return value from caller.
yaclib_std::atomic_uintptr_t _callback
~ResultCore() noexcept override
ResultCore(Args &&... args) noexcept(std::is_nothrow_constructible_v< Result< V, E >, Args &&... >)
Result< V, E > & Get() noexcept
decltype(auto) MoveOrConst()
YACLIB_INLINE auto Impl(InlineCore &caller) noexcept
void Store(Args &&... args) noexcept(std::is_nothrow_constructible_v< Result< V, E >, Args &&... >)
#define YACLIB_ASSERT(cond)
#define YACLIB_PURE_VIRTUAL()
constexpr auto * DownCast(From *from) noexcept
Contract< V, E > MakeContract()
Creates related future and promise.