cuda::experimental::stf::sump::always_t#

template<class _A, class _B>
struct always_t#

Runs the head, then every finalizer, on the exception path – the finalizers run whether the head accepts or forwards.

The composite’s answer is the HEAD’s; finalizers’ answers are discarded. If the head forwards, the finalizers observe the in-flight exception and the head’s exception then continues onward (a finalizer’s own throw replaces it, as anywhere in C++). Later arguments are increasingly unconditional. A named function, not an operator: it has no left identity.

Public Functions

template<class _Fn>
inline decltype(auto) on_thrown(
const ::std::exception *__e,
const ::cuda::std::source_location __loc,
_Fn &__fn
)#
template<class _Status, class _Fn>
inline detail::__status_answer<_Status> on_returned(
const _Status __status,
const ::cuda::std::source_location __loc,
_Fn &__fn
) noexcept(detail::__status_path_nothrow_v<_A, _Status, _Fn> && detail::__status_path_nothrow_v<_B, _Status, _Fn>)#

The code-channel hook: offers the status to the head, then to every finalizer, and answers the head’s answer.

If the head throws, the finalizers still run and the head’s exception continues onward.

template<class _R, ::cuda::std::enable_if_t<detail::__has_on_success_with<_A, _R>, int> = 0>
inline decltype(auto) on_success(
_R &&__r
)#
template<class _Self = _A, ::cuda::std::enable_if_t<detail::__has_on_success_void<_Self>, int> = 0>
inline decltype(auto) on_success(
)#
template<class _AA = _A, class _BB = _B, ::cuda::std::enable_if_t<detail::__has_on_enter<_AA> || detail::__has_on_enter<_BB>, int> = 0>
inline void on_enter(
) noexcept(detail::__on_enter_nothrow_v<_A> && detail::__on_enter_nothrow_v<_B>)#