cuda::experimental::stf::sump::remember_t#

template<class _Ptr>
struct remember_t#

Serves the last successful value when a later call throws.

The cell is designated by pointer – a raw T* for a caller-owned variable, or a shared_ptr<T> when the policy should share ownership; the two are distinguished statically by overload. Success updates the cell and passes the result through; failure substitutes the stored value (an lvalue: it can serve reference results).

Public Functions

template<class _R>
inline ::cuda::std::conditional_t<::cuda::std::is_lvalue_reference_v<_R&&>, _R&&, ::cuda::std::remove_cvref_t<_R>> on_success(
_R &&__result
)#
template<class _Fn>
inline decltype(auto) on_thrown(
const ::std::exception*,
const ::cuda::std::source_location,
_Fn&
) const noexcept#