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) runs p’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 &#8212; 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 from std::exception reaches p’s hook as a null pointer. A pack where one type claims another (identical or base-of) is rejected &#8212; the claimed entry would be dead.