cuda::experimental::stf::exception_policies::catch_only#
-
template<class ..._Es, class _P>
auto cuda::experimental::stf::exception_policies::catch_only( - _P &&__p
Restricts a policy to exceptions matching any of
E1, E2, ...:catch_only<E...>(p)runsp’s exception path when the active exception matches any listed type by catch-clause rules (same or publicly derived), and otherwise declines by rethrowing.The listed types may be anything catchable — std::exception derivatives, user structs, even
int. Native C++ has no multi-type catch clause; this adds that expressivity. A matching exception that does not derive fromstd::exceptionreachesp’s hook as a null pointer. A pack where one type claims another (identical or base-of) is rejected — the claimed entry would be dead.