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());
61 template <
bool SymmetricTransfer,
bool Shared>
63 if constexpr (std::is_copy_constructible_v<Result<V, E>>) {
65 const auto ref = caller.GetRef();
70 return BaseCore::SetResultImpl<SymmetricTransfer, Shared>();
79 return BaseCore::SetResultImpl<SymmetricTransfer, Shared>();
80 }
else if constexpr (std::is_move_constructible_v<Result<V, E>>) {
84 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 &&... >)
virtual Result< V, E > Retire()=0
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.